Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hidden MessageBox
Message
 
To
19/10/1997 06:39:31
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00041174
Message ID:
00055393
Views:
74
>>>
>>>George:
>>>
>>>Thanks for kicking in on this. I'm afraid I don't know enough about what you are talking about to even try it. What is the syntax for adding these numbers into my call to MESSAGEBOX()? How can I change the modality once I have added these numbers? Sorry to be so ignorant . . . .
>>>
>>>TIA.
>>>John
>>
>>John,
>>
>>Don't apologize, we've all been there.
>>
>>Somewhere in your code, in setting the button, icon, etc., I suspect that you've got some code that looks something like:
>>
>>* Yes/No buttons, Stop icon, Second button has the focus
>>lnDialogBoxType = 4 + 16 + 256
>>
>>Either that or you're passing the values directly.
>>
>>To change the modality level, simply change the above to:
>>
>>* Yes/No buttons, Stop icon, Second button has the focus, Task modal
>>lnDialogBoxType = 4 + 16 + 256 + 4096
>>
>>This should bring it to the foreground.
>>
>>Unfortunately, this functionality wasn't documented in the help file. I first found out about it from using the MsgBox() function in FOXTOOLS.FLL, and reading the Win 3.1 SDK. Both MsgBox() in FOXTOOLS and MESSAGEBOX() in VFP are really nothing more than a call to the MESSAGEBOX() function in the Windows API. The modality level (or scope) is mentioned in the SDK documentation.
>>
>>Please let me know if this solves your problem.
>>
>>Good Luck,
>
>George:
>
>I added 4096 to 16 (stop icon)--nothing changed. The MessageBox still appears "underneath" the other windows. Only by pressing the key all by itself does it appear. I now have four places where this is happening consistently. ARGH!!!!
>
>In my latest occurrence, I have two modeless windows open and pop up a modal dialog box. The validation routine of a control throws a MessageBox to the screen, but not visible without . If I make the dialog box invisible before the MessageBox call, it still isn't visible--it must be buried beneath the modeless windows. Any ideas???
>
>TIA.
>
>John
>>
>>George

John,

Yeah, try adding 65536 to the value. This should make it the foreground window. I don't think I mentioned that in the Knwoldge Base article. I try to update it tomorrow.

HTH,

George
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform