Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do you Make a Form from an Existing Class

Status
Not open for further replies.

fmoore0001

Programmer
Dec 3, 2002
192
US
How does one create a form from a class form. I haves several Class forms in a project used to make other forms and I want to use one of them in my own form.

Frank

 

fmoore0001,

from the "view classes" in your toolbar, select add. locate the class you want to use. foxpro will add a button just beside the "view classes" for your class. then drag it in your form.

HTH
 
fmoore0001

Try:

SET CLASSLIB TO myClass.vcx ADDITIVE
oForm = createobject("myForm") && The form class
oForm.show(1)


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Frank,

Do you mean that you want to create a form in the form designer, the form being based on an existing form class? If so, do this in the command window:

CREATE FORM MyNewForm AS MyClass FROM MyClassLibrary

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Actually, I wanted to create a NEW form BASED on an EXISTING class.

Frank
 
Another option is to go to Tools --> Options and select the Forms tab. In the bottom third of the screen is a checkbox called "Form". When you check that box, VFP brings up a dialog where you can select the form class to use. Any new forms you create during your VFP session will automatically use that class. If you click Set As Default, future VFP sessions will use that class as well.


-BP (Barbara Peisch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top