Hi,
If you want to stay in the managed arena you can get the control references by
doing the following:
class DerivedForm : ParentForm
{
public DerivedForm()
{
// assuming that one Button.Name is "button1":
Button button1 = (Button) Controls["button1"];
// and just use the reference like normal
button1.Location = new System.Drawing.Point(0, 0);
}
}
If you are unsure of the names of the buttons then place a break point on the
first line and exam the Controls collection in a watch window.
Of course, I'm assuming with this code that the base constructor will have
initialized the Buttons already, which is probably good since the designer
serializes initialization into an InitializeComponents method that will have
executed already in common scenarios.
--
Dave Sexton
"Its Me Ernest T." <sp**@myplaceinspace.comwrote in message
news:C4******************@tornado.southeast.rr.com ...
>I am looking for any information about how I could subcass a form I don't own
and resize some buttons.
We run a application which is extreamly legacy and the company has long
since went out of business. This application will install on WinXP but the
buttons on the form are smaller than they should be. I would like to hook
into this form and resize the buttons. I remember working on things like
this a few years back with VB but its been a while so any help or sites
would be appreciated.