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!

VCX form to an SCX?

Status
Not open for further replies.

dantheinfoman

Programmer
May 5, 2015
131
US
Hi All,

Is there any way to make this beautiful vcx form into an SCX. I'd like to tweak it and use as stand alone SCX.

Thoughts?

Thanks

Dan
 
Maybe use the class's SaveAs method?

So, add a temporary button to the form class. In its Click event, call the class's SaveAs method, passing the name of the target SCX file. Then run the form, and click button. Finally, remove the button from the form.

I've never done this, and I've no idea if it will work. But worth a try if you don't get any better suggestions.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
.SaveAs() will handle it but I wonder why you need it?

(In the early days, we thanked Microsoft resoundingly for adding SaveAs() but I never found a need for it.)

This just strikes me as the type of question that's really easy to answer and walk away, but you'd be better served with a little more exploration because there might be some simple detail you didn't understand that made you ask for this.

Oh, and no need to add a button. Just instantiate the class and call .SaveAs("filename.scx").
 
Hi danfreeman,

I'm working with a team and I don't want to add anything or take away from the base class, just want a new form I can mess with. Thanks!
Dan
 
I agree to Mikes last answer.
Create a new class anything, write to a new classlib. If you have a long library list as I: Name the lib alphabetically near to the one the form is part of.
Drag and drop the form class over into the new classlib, remove the anything class you only used to create the classlib and rename the form class copy to avoid confusion.

Bye, Olaf.
 
just want a new form I can mess with

Version control could help here. Check the file out, mess with it, and when you're done undo the checkout discarding any changes you made.

Having a second copy of any piece of source code can cause immense confusion later.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top