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

Inserting code programatically.

Status
Not open for further replies.

michaelkatz

Programmer
Sep 1, 2002
50
GB
I would like to insert some code into the "DragDrop" method of @ 175 controls on a pageframe. The original programmer was inexperienced and the controls are classes from 7 different libraries. I hesitate to make the changes in each of them, as I am not aware of what the effects might be on other applications using them.

I also do not feel like copying and pasting..

--- THIS.Parent.DragDrop(oSource, nXCoord, nYCoord) ---

to 175 controls, because there are over 30 forms in the application.

Any ideas are appreciated.

Michael
mkatzla@juno.com
 
Go to and look for 'NewClass' in the downloads section.

This application will replace any class of any application with a class of your choice, on a class basis.

That is to say if there are 50 controls on a form with the same class, you change all 50 at one time.

So to resolve your problem, you can create an appropriate class and save it to a library and then run the NewClass application.
FAQ184-2483 - the answer to getting answered.​
Chris [pc2]
 
Hi

Probably Think of starting yet another class.. huh!

But this time.. your perfect class.. so that as days progress you can have this as the ultimate universal class.

Then .. in this class.. you can drag and drop the classes from other classes. When you do this... the other classes keep those classes.. only an additional copy is create into your class. SO you are safe with the earlier classes and those applications using them will continue to use them.

You can make a base form or subclass of your own form.. which contains the seven or less or more of the classes as your base form. SO when you make your application start with this form class as its class.. you dont even need to copy the codes.. You are there straight with the class codes. :)

Any existing form can be redefined to use this new class.. if you feel so and thus convert one by one all forms which were using different classes.

:)
ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top