Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 To: FoxGuy Ruiz
  Where is FoxGuy Ruiz?
 hawthorne
 California - United States
 FoxGuy Ruiz
 Tags
Subject: RE: call a form in a screen
Thread ID: 143435 Message ID: 143441 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Tuesday, August 28, 2007 8:43:50 PM         
   


> How can i call a form in a screen. For example i want to call a form when i press the f10 key in the following screen:
>
> This is what i want to do. In my program i have a vfp dbf which contains several items(fish description) and what i want to accomplish is in every item display like a popup windows or form displaying the picture of the fish when pressing a specific key on the keyboard, i say the f10 key.
>
> can someone suggest if these approach is fine, or is there a better way to do it.
> i'm not that good of a programmer, i'm still in the process of learning, so if someone has a easy way to do this please let me know.
>

First, it doesn't look like Visual FoxPro, more like ol' good FoxPro for DOS, if not FoxBASE.
Second, take a look at the INKEY() function in VFP's Help: you will see there ASCII codes for the KeyPress event for practically any key on a keyboard. F10 renders as 28.
Third, you may want to write a procedure, or function, or even create some form with Image control to show your picture, and Command button to close this form.
Then, look up the ON KEY LABEL command, and FORM.KeyPress event and FORM.KeyPreview property.
Select with one is more fitting and use it to call your form with that image.

That's a nutshell scenario. Play with it and see if it works for you.

HTH.

Regards,

Ilya

ENTIRE THREAD

call a form in a screen Posted by FoxGuy Degante @ 8/28/2007 8:01:21 PM
RE: call a form in a screen Posted by Ken Murphy @ 8/28/2007 8:34:53 PM
RE: call a form in a screen Posted by Ilya Rabyy @ 8/28/2007 8:43:50 PM