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

Changing Classes

Status
Not open for further replies.

AlanArons

Programmer
Aug 1, 2002
91
US
Is there a way to change the Class of an object after it has been created.

I am converting a Foxpro for Windows app to Visual Foxpro 9 and many of my "buttons" are not coming as Buttons.

Thanks for your help.

Alan Arons[ponder]
 
Alan,

You can change the base class of a class by using the Class Browser (on the tools menu). Look for the "rebase" option. This allows you to change the parent class that the subclass is based on.

However, that won't work if you want to rebase an object, as is the case if you have already placed the class on a form (or inside some other container).

The usual way to rebase an object is to edit the underlying VCX or SCX file, but it's not particularly easy, and will definitely cause problems if you do it wrong.

However, Rick Schummer has an excellent tool that will do the job for you. It's very easy to use, and completely safe. It's called HackCX. You can find details at
Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thanks Mike,

I think the HackCX tool is what I am looking for. I appreciate your help.

Alan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top