next ilp
if iobjecttype >= closebtn then
iobjectstate = ienabled
if iobjecttype = closebtn then
raiseevent clicked
end if
else
if not (iobjectstate = idisabled) then
if iobjectstate = ipressed and iobjecttype = btn then
iobjectstate = ienabled
raiseevent clicked
end if
end if
end if
mouseup = true
end if
end function
if the control has been clicked we use raiseevent to notify the app that this is so. the app can then decide what to do based on which control has been clicked. in our case we do two things ?destroy the window and close the app:
private sub closebutton_clicked()
window.removechildren
set window = nothing
end sub
private sub okbutton_clicked()
gbrun = false
end sub
you can recreate the window by pressing the f1 key. try it and see. i抣l wait while you do. j
got all that? good, then lets more on to more cool stuff.