Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hidden MessageBox
Message
De
28/07/1997 04:22:14
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00041174
Message ID:
00041907
Vues:
59
>>I have a recurring problem as follows:
>>
>>I have a modeless form (FORM1) that calls a modal form (FORM2) via a command button. Within the modal form (FORM2), the user presses a button that necessitates a yes-no question to be answered. So I use a MESSAGEBOX to ask the question. The problem: most of the time, the MESSAGEBOX appears "underneath" the modal form (FORM2) and is, therefore, invisible to the user. If I Hide() FORM2 before calling the MessageBox, it shows up perfectly.
>>
>>What, apparently, is happening is that the MessageBox "attaches" itself to the modeless form (FORM1), displaying itself on top of it. However, since the modal form (FORM2) takes up the entire screen, the MessageBox is invisible. If I press the key, the MessageBox jumps to the top--no idea why. BUT if the user doesn't know to press the key, the program looks as if it is hung up--there is a MessageBox waiting for an answer, but the user cannot respond since s/he can't see the damned thing! I have tried disabling both forms--no good.
>>
>>Any ideas out there??? TIA . . . .
>>
>>John
>
>The VFP MESSAGEBOX() function is really nothing more than a hook into the Windows API function by the same name. While it's not documented in the VFP help file, you can control the modality level of MESSAGEBOX().
>
>Try adding 4096 and/or 8192 to the values you're passing to the function. 4096 corresponds to MB_SYSTEMMODAL, 8192 to MB_TASKMODAL. Default state is MB_APPMODAL (0).
>
>HTH,
>
>George

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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform