PDA

View Full Version : Usage of the DIALOG NEW Keyword



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

kryton9
27-05-2007, 21:46
Abraxas, that is really nice how you are doing all of these and/or finding nice examples!!

Michael Clease
27-05-2007, 23:08
Well i am new to thinbasic so i am learning as I go and If I can help someone else when the help information is unclear or missing that can only be a good thing.

I know the programming aspect of (Thinair/basic) is not a community project but making the help files open to submissions will only boost the appeal of it and get more people to use it.

kryton9
28-05-2007, 00:54
It will help someone like me too, who has bad memory and confuses things all the time from different languages. I always refer to help or have to dig through sample scripts to find things. This is really nice!

I am currently focused on learning c++, but once feel I am up to speed on it, will get back into programming with thinBasic and adding to this project. thinBasic is just so much nicer and easier to use than c++, if I start back on it I will lost my focus, hence not going back and forth at this time. But reading the forums on breaks.