Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Saurabh Samir
  Where is Saurabh Samir?
 Ahmedabad
 India
 Saurabh Samir
Subject: RE: Interacting with user without messagebox
Thread ID: 464600 Message ID: 464605 # Views: 75 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Classes and Objects
Date: Thursday, March 28, 2019 10:07:57 AM         
   



> Respected members,
> Messagebox returns 6, .T., .F., etc.
> But it has it's own flavor of size and look.
> I wanted to present one line message inside a box inscribing that message to user expecting enter for accepting and escape for rejecting.
> I designed a modal form and a label on it. Then written on form's keypress the code for escape and enter to return .F. or .T.
> But this is not working.
> What would be the best way for me to work it out.
> The label on the same form (where I want user's interaction) is not good as execution does not stop at the point. And Messagebox is not wanted.
> -----------------------------------------
> Best Regards
> A Beginner, not only of VFP...


What do you mean when you say "is not working"?

If your Form.KeyPress() code does not run, you may need to set Form.KeyPreview=.T.

You would however not need Form.KeyPress() if you'd have an "okButton" on the Form with the okButton.Default property being .T.
That one would handle the Enter key automatically, i.e. its Click() event would run.
And a "cancelButton" could do the same for the Esc key when its .Cancel property is .T.



hth
-Stefan

ENTIRE THREAD

Interacting with user without messagebox Posted by Saurabh Samir @ 3/28/2019 9:18:36 AM
RE: Interacting with user without messagebox Posted by Tore Bleken @ 3/28/2019 9:26:16 AM
RE: Interacting with user without messagebox Posted by Saurabh Samir @ 3/28/2019 9:41:33 AM
RE: Interacting with user without messagebox Posted by Tore Bleken @ 3/28/2019 9:53:24 AM
RE: Interacting with user without messagebox Posted by Saurabh Samir @ 3/28/2019 10:01:33 AM
RE: Interacting with user without messagebox Posted by Tore Bleken @ 3/28/2019 10:16:57 AM
RE: Interacting with user without messagebox Posted by Saurabh Samir @ 3/28/2019 10:28:38 AM
RE: Interacting with user without messagebox Posted by Stefan Wuebbe @ 3/28/2019 10:07:57 AM
RE: Interacting with user without messagebox Posted by Saurabh Samir @ 3/28/2019 10:22:17 AM
RE: Interacting with user without messagebox Posted by Stefan Wuebbe @ 3/28/2019 10:35:49 AM
RE: Interacting with user without messagebox Posted by Saurabh Samir @ 3/28/2019 11:00:33 AM
RE: Interacting with user without messagebox Posted by Stefan Wuebbe @ 3/28/2019 11:44:58 AM
RE: Interacting with user without messagebox Posted by Saurabh Samir @ 3/28/2019 12:18:37 PM
RE: Interacting with user without messagebox Posted by Vilhelm-Ion Praisach @ 3/28/2019 1:09:08 PM
RE: Interacting with user without messagebox Posted by Jose Martin Hernandez @ 3/28/2019 4:17:02 PM
RE: Interacting with user without messagebox Posted by Vilhelm-Ion Praisach @ 3/29/2019 11:23:20 AM
RE: Interacting with user without messagebox Posted by Jose Martin Hernandez @ 3/29/2019 4:22:04 PM
RE: Interacting with user without messagebox Posted by Saurabh Samir @ 3/29/2019 5:22:18 AM
RE: Interacting with user without messagebox Posted by Vilhelm-Ion Praisach @ 3/29/2019 11:26:09 AM