Michael Clease
27-05-2007, 19:50
I found this in the forum by Psch http://community.thinbasic.com/index.php?topic=691.0 post 3, I thought it was a good example.
uses "UI"
DIM hDlg AS DWORD
dim Msg, wparam,lparam as dword
DIALOG NEW 0, "APPTITLE",-1,-1, 330, 203, %WS_POPUP OR %WS_VISIBLE OR %WS_CLIPCHILDREN OR %WS_CAPTION OR %WS_SYSMENU OR %WS_MINIMIZEBOX, 0 TO hDlg
CONTROL ADD button, hDlg, 1001,"Click to kill", 90, 50, 150, 100
DIALOG SHOW modeless hDlg
while isWindow(hDlg)
Msg = GetMessage(hDlg, wParam, lParam)
select case Msg
case %WM_Command
if wParam = 1001 then EXIT WHILE
CASE %WM_SYSCOMMAND
if wParam = %SC_CLOSE then EXIT WHILE
END SELECT
wend
DIALOG END hDlg
uses "UI"
DIM hDlg AS DWORD
dim Msg, wparam,lparam as dword
DIALOG NEW 0, "APPTITLE",-1,-1, 330, 203, %WS_POPUP OR %WS_VISIBLE OR %WS_CLIPCHILDREN OR %WS_CAPTION OR %WS_SYSMENU OR %WS_MINIMIZEBOX, 0 TO hDlg
CONTROL ADD button, hDlg, 1001,"Click to kill", 90, 50, 150, 100
DIALOG SHOW modeless hDlg
while isWindow(hDlg)
Msg = GetMessage(hDlg, wParam, lParam)
select case Msg
case %WM_Command
if wParam = 1001 then EXIT WHILE
CASE %WM_SYSCOMMAND
if wParam = %SC_CLOSE then EXIT WHILE
END SELECT
wend
DIALOG END hDlg