Code:
#compile exe #dim all #register none #include "win32api.inc" declare callback function DlgProc function pbmain local hDlg as long dialog new 0, "",,,400, 300, %WS_SYSMENU or %WS_MINIMIZEBOX or %DS_CENTER to hDlg dialog show modal hDlg call DlgProc end function function ThreadFunc(byval hDlg as long) as long sleep 1000 msgbox "See you...",,"ThreadFunc" SetWindowText hDlg, "Dialog still OK..." end function callback function DlgProc local r as long, h as long select case cbMsg case %WM_INITDIALOG thread create ThreadFunc(cbhndl) to h : thread close h to r end select end function
Leave a comment: