Hi, I try to use a bitmap skin and I created ( X ) ???
a button call Xbutton to exit the program.
-----------------------
SUB FORM1_XBUTTON_Events( MyID&, CMsg&, CVal&, Cancel&)
SELECT CASE CMsg&
CASE %EZ_Click
(what is the best to exit ::) )
CASE ELSE
END SELECT
END SUB
-----------------------
do I have to sent message terminate,
or exit,
or use %WM_CLOSE,0,0 EXIT FUNCTION
or use the END statement (NEW!) Purpose
Terminate program immediately.
Syntax END [nErrorLevel&]
I just try to find the best way to exit :)
Robert,
Your code is EZGUI event code, not API code, so when using EZGUI you close a form like this:
EZ_UnloadForm "MyFormName"
EZGUI handles the rest. You can put such code in the %EZ_Click event for a button control if you like.
You can use something like this:
SUB FORM1_XBUTTON_Events( MyID&, CMsg&, CVal&, Cancel&)
SELECT CASE CMsg&
CASE %EZ_Click
EZ_UnloadForm "{ME}"
CASE ELSE
END SELECT
END SUB
EZGUI 5.0 supports a new quick syntax, if the code will effect the same form as the event occurred for, which is "{ME}"
Assuming the button control is on the same form you want to close, then "{ME}" is fine.
As far as terminating the application, EZGUI automatically terminates the app when the last form is closed (or unloaded).