Message
From
15/12/2006 07:31:41
 
General information
Fórum:
Visual FoxPro
Category:
Formulários & Criador de Formulários
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
ID da thread:
01177881
ID da mensagem:
01177928
Views:
10
Have you tried something like INKEY(0.5,"MK") after the messagebox() line?

>Hi Terry
>
>Thanks for your response.
>
>
>>You've got me confused here:
>
>Sorry, but so am I in regards to what is happening :)
>
>
>>1) I thought the modal form did the date-getting and validation, and MSGBX warning,
>
>Yes, your understanding is correct
>
>
>>so what do you mean: "...then Enter is passed onto my modal form and the default button Ok is also pressed"
>>2) You've oulined the scenario now can you explain more clearly what happens.
>
>Now that the MSGBX warning is displayed to the user. The user reads the message and presses Enter. This closes the MSGBX alright. But my dialog's Okay (default) button also gets pressed. As if I had press Enter twice, one for the MSGBX and second for my dialog.
>
>>3) a sample of code would help illustrate the problem, which I can't determine from your post.
>
>
IF THIS.VALUE > THISFORM.txtFromDate + 50
>   THIS.VALUE = THISFORM.txtFromDate + 50
>
>   MESSAGEBOX("...", 48, "...")
>
>   THIS.SETFOCUS()
>ENDIF
>
>I have tried to put this code in both the LostFocus() and Valid() of the txtToDate control. I have tried to change 48 to other values but no luck. I also tried to put in a CLEAR TYPEAHEAD after the message box call, no luck.
Previous
Next
Responder
Mapa
View