GetMainFormName(), GetMainFormHandle()
Posted: Sun Sep 11, 2016 9:03 pm
Functions GetMainFormName() and GetMainFormHandle() cause run-time error, if main window is not defined.
They could be a little modified, eg.:
They could be a little modified, eg.:
Code: Select all
*-----------------------------------------------------------------------------*
Function GetMainFormName ()
*-----------------------------------------------------------------------------*
IF _HMG_MainFormIndex > 0
Return GetFormNameByIndex (_HMG_MainFormIndex)
ENDIF
Return ''
*-----------------------------------------------------------------------------*
Function GetMainFormHandle ()
*-----------------------------------------------------------------------------*
IF _HMG_MainFormIndex > 0
Return GetFormHandleByIndex (_HMG_MainFormIndex)
ENDIF
Return 0