Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Control MetaData

0 views
Skip to first unread message

RajkiranPro

unread,
May 16, 2008, 2:07:03 AM5/16/08
to
Is There A Way To Change The Default Properties Of the Controls

For Example

If we place a button on on the form its default name is button1 and
if we place the next button its button2 and so on..

Instead i want it to be btn1, btn2, btn3 by default...

I know to create it by using a component class

namespace System.Windows.Forms
{
public class btn : System.Windows.Forms.Button
{

private System.ComponentModel.IContainer components = null;

protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}

public btn()
{
InitializeComponent();
}

public btn(IContainer container)
{
container.Add(this);

InitializeComponent();
}

}

}


However I want to change this without creating a new class for it..

Is there a way to do this by editing the meta data..

if yes wats the procedure..


Thanks In Advance

Regards
Rajkiran

0 new messages