Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hidden MessageBox
Message
De
28/07/1997 04:26:21
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00041174
Message ID:
00041908
Vues:
50
>>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 only way I could simulate your situation was
>Form 1 (non modal)
>Form 2 (modal form with always on top set to True)
>
>Form 1 Calls Form 2 and immediately calls the message box.
>
>If this is what you are doing then try calling the messagebox from the Activate() of form 2.
>
>Kamal

Kamal:

In my case, I have a command button that invokes a third modal form with a listbox of available reports on FORM2. The user makes his/her choice and selects OK. I Release() FORM3 and, from the Click()method of the command button, call MESSAGEBOX. It is now hidden. The Alt key, by itself, makes it appear immediately. Any ideas?

Thanks a lot for your help.
John
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform