Posted by Grant Foraker on September 14, 2009 at 12:16:43:
In Reply to: Re: Cmaint 16.0 posted by Jon Sacks on September 09, 2009 at 06:43:00:
Jon:
Sorry to be slow. Took an Alaska cruise. Checked my email occassionally :) Nice big storm at sea. Great trip!
Program logic is like so ...
A:
cosDllNames$ = "Cmaint.dll" ! DLL filename
LET cosDllDir$ = SUB(FSTAT(cosDllNames$),3,3) ! DIR of DLL
B:
!---------- get the horizontal resolution -------------------------------------!
LET cosIndex = 0 ! Horizontal Resolution
Gosub COS.GetSystemMetrics
SELECT CASE cosFuncResult
CASE FROM 0 TO 1023
cosDlgId = IDD.CMAINT.LOW ! Dialog ID
CASE FROM 1024 THRU 1919
cosDlgId = IDD.CMAINT.MED ! Dialog ID
CASE ELSE
cosDlgId = IDD.CMAINT ! Dialog ID
ENDSELECT
!===== If your dialog was designated as "child" it will be modeless.
!===== If "popup" it will be modal.
!
C:
gosub CW.CreateAutoModeDialog
if cosDlgOpen = FALSE
LET MBMSG$ = 'DLL = ' + cosDllNames$ + '@0D0A@' + 'DIR = ' + cosDllDir$
MSGBOX(MBMSG$)
go ProgExit
endif
A - sets the DLL name and DIR. Based on the error message, this looks OK
B - sets the dialog based on screen resolution
C - Brian's gosub to open DLL and get dialog. Followed by the error message I added to help debug.
Two possible reasons why you might get the error.
1) If you use Qtilities option #4 to copy a DLL file it will be corrupted by Comet. Rename (#3) works.
2) I've been testing on a 1920 wide screen (High Resolution). I'll move CMAINT over to my 1440 PC and see if the problem is in the Medium dialog.
Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.