Thanks Kev,
I knew it had to be something obvious, sometimes when one is too close to the situation, the obvious is missed.
Then again if nothing goes wrong, then there is nothing to learn.
Announcement
Collapse
No announcement yet.
MsgBox vs Messagebox
Collapse
X
-
Invalid parent handle (hDlg) since by then the modal dialog would have been destroyed.
A quick check with GetLastError would have told you that. MSGBOX does not have a parent thus is not affected.
Leave a comment:
-
-
MsgBox vs Messagebox
I have stumbled upon a situation that I can not explain/understand.
Can someone please explain this?
Code:' Dialog Show Modal hDlg, Call ShowDIALOG8Proc To lRslt Dialog Show Modeless hDlg, Call ShowDIALOG8Proc To lRslt MessageBox hDlg, "Messagebox - result = " + Str$(lRslt), "RB", %mb_ok MsgBox "MsgBox - result = " + Str$(lRslt), %mb_taskmodal, "RB"
However if I execute this:
Code:Dialog Show Modal hDlg, Call ShowDIALOG8Proc To lRslt ' Dialog Show Modeless hDlg, Call ShowDIALOG8Proc To lRslt MessageBox hDlg, "Messagebox - result = " + Str$(lRslt), "RB", %mb_ok MsgBox "MsgBox - result = " + Str$(lRslt), %mb_taskmodal, "RB"
The MessageBox one disappeared, went for a "walk", or just refuses to do something
Anybody have any ideas?
It is not so important in the context of this example, but I am sure there must be a valid explanation for it.
Some basic principle that I am unaware of, that will sneak up and bite when least expected.Tags: None
-
Leave a comment: