Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot show dialog error in exe
#2
In most cases it is when some of control classes used in the dialog is not registered.
Probably it is QM_Grid.
ShowDialog registers it, but fails if qmgrid.dll is missing.
Take qmgrid.dll from QM folder. Put in exe folder on each computer.
Or use this function.
Function ExeQmGridDll2
Code:
Copy      Help
;/
function!

;Use this function in exe if you want to add qmgrid.dll to the exe file.
;When making exe, this function adds qmgrid.dll to exe.
;When exe runs, this function extracts the dll to temp folder, and loads.
;Don't use this function if you want the dll to be separate file.

;Returns: 1 success, 0 failed.

;Added in: QM 2.3.3.

;EXAMPLE
;ExeQmGridDll2 ;;somewhere at the beginning of exe code


#if EXE
#exe addfile "$qm$\qmgrid.dll" 21079
if !GetModuleHandle("qmgrid.dll")
,_s.expandpath(F"$temp$\qm\0x{QMVER}\qmgrid.dll")
,if !dir(_s)
,,if(!ExeExtractFile(21079 _s)) ret ;;also creates folders.
,if(!LoadLibrary(_s)) ret
#endif
ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 15 Guest(s)