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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using scx form in another form

Status
Not open for further replies.

shresthaal

Programmer
Jun 8, 2005
62
US
i am trying to create an application in which i use a scx form in another form. i do not know if it is possible. i have not reached that part of the project but i would like to know if there is anything that i need to take care or consider while i am building the first form.
will be grateful for any advise
 
well i want to drop the form that i am working on right now to another form. i think what i mean to do is to use the scx form i am working on as an object that i can use on another form
 
Edit the original form and choose Save As Class from the File menu. Then you can go to Tools->Options and choose the Forms tab and select to use your new form class. Dont forget to Set as Default.

Regards,

Mike
 

shresthaal,

No, you can't drop one form on another form. Instead, create a class that contains the functionality of the second form. Then drop that class on the first form.

It's also possible to combine two forms in a form set, but that's really just a backward compatibility feature, and there's rarely a good reason for using it.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 

Chris,

You can include a form in another form providing the 'parent' form is top-level

I don't think that's what shresthaal was referring to. He wanted to make his second form a child of the first form, in the sense of it being within the containership hierarchy. I think you are thinking of the "in top-level form" setting, which means that you can launch the second form in the same screen space as the first form.

That said, I might have misunderstood this completely.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Mike
Mike said:
...which means that you can launch the second form in the same screen space as the first form.
That was what I thought shresthaal was after but equally, I might also have misunderstood this completely.



FAQ184-2483 - answering getting answered.​
Chris [pc2]
PDFcommander[sup]tm[/sup].net
PDFcommander[sup]tm[/sup].com
 
ok
i am planning one making 23 copies of the first form and then putting it on the second form. the second form will not do anything except for holding and initializing the first form.
 
shresthaal,

As Mike says
you can't put one form on (or in) another form
You can run one form from another, but that doesn't sound like what you want?


Perhaps someone could make a suggestion if you tell us why you want to "use a scx form in another form". What are you wanting to do? What is the second form supposed to be doing? Is it controlling the other 23 forms?

Stewart
 
shresthaal

To clarify, you can run a form(s) within another form providing the form is top-level - that's been available since VFP 5.0.

How To Display a Form in a Top-Level Form on Startup explains how and answers my understanding of your original question
shresthaal said:
i am trying to create an application in which i use a scx form in another form.
However using a top-level form may not suit your application - it's also hard to comprehend why you would require so many forms?

FAQ184-2483 - answering getting answered.​
Chris [pc2]
PDFcommander[sup]tm[/sup].net
PDFcommander[sup]tm[/sup].com
 
You can make a form the child of another form. Christof does it in one of his apps. I haven't actually done it myself, but the command is:

ACTIVATE WINDOW "Child" IN WINDOW "Parent"

pamela
 

May I suggest that what shresthaal actually needs may be not an .scx form to drop 23 copies of which on another form, but some container class, and possibly a pageframe with 23 pages? It's what it looks like to me from reading the posts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top