Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 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: 143438 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Tuesday, August 28, 2007 8:34:53 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.
>

Foxguy,

The easiest way to do this is to use a modal form. Begin by creating a form, go into the form properties and change the .WindowType property to 1 && modal. Let's say you want to pop a product description form that identifies all of the properties of the product currently being displayed on your screen. Drag the fields you want to display from the Data tab of your project (you may have to expand the product table) onto the form. This will give you textboxes, checkboxes, edit boxes, etc. Add any labels you may need, etc. close and save the form. To run the form, all you need do is call this form. To get the form to work from the F10 key, you will need to use the ON KEY command. Take a look at it in the help file.
ON KEY LABLE [F10] DO FORM [Path2\MyPopupForm]


Note: for this to work you will need to leave the form's datasession property as 1 && Default Datasession.

Give it a go and come back here with questions if you need to.

Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

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