<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > UI (User Interface) > DIALOGS > Dialog Pseudo-object Methods and Properties > <DialogName>.Close |
Description
Closes the dialog.
Syntax
<dialogName>.Close
Returns
None
Remarks
Restrictions
See also
Examples
uses "ui"
#resource "frmMain.rc" ' Resource file containing dialog named frmMain and button named btnClose
function TBMain()
dialog new units, name frmMain, %HWND_DESKTOP ' Style and controls loaded from RC file,
' dialog and control have now automatic frmMain and btnClose pseudo-objects
dialog show modal frmMain.Handle ' Dialog displayed as modal
end function
' Event handler for OnDestroy event of named dialog
callback function frmMain.OnDestroy()
msgBox frmMain.Handle, "Window is to be destroyed."
end function
' Event handler for OnClick event of named button
callback function btnClose.OnClick()
frmMain.Close
end function