473,385 Members | 1,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Is it allowed to edit InitializeComponent()

Hello!

I use VS 2003.
I have a control for example System.Windows.Forms.TextBox();
I drag this System.Windows.Forms.TextBox() control into a form.

Now assume I want to add more functionality to this
System.Windows.Forms.TextBox() which mean
I want to create a subclass to this System.Windows.Forms.TextBox() called
ExtTextBox.

How do I do that?

I assume it's not allowed to edit InitializeComponent()
In some way I must say that the control I drag into the form is an instance
of class ExtTextBox.
Where do I do that.

//Tony
Mar 16 '06 #1
1 2145
vj
Tony

You need to write a class of your own, that derives from Textbox class,
compile that as DLL.. This Dll if you reference (add reference), will be
available to add as control any project..

// Compile the below class a Class Library
public class ExtTextBox : System.Windows.Forms.TextBox
{

public ExtTextBox()
{

}

// Methods.. and other properties..

}

"tony" <jo*****************@telia.com> wrote in message
news:uv**************@TK2MSFTNGP11.phx.gbl...
Hello!

I use VS 2003.
I have a control for example System.Windows.Forms.TextBox();
I drag this System.Windows.Forms.TextBox() control into a form.

Now assume I want to add more functionality to this
System.Windows.Forms.TextBox() which mean
I want to create a subclass to this System.Windows.Forms.TextBox() called
ExtTextBox.

How do I do that?

I assume it's not allowed to edit InitializeComponent()
In some way I must say that the control I drag into the form is an
instance
of class ExtTextBox.
Where do I do that.

//Tony

Mar 16 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Tamir Khason | last post by:
How to prevent the selected cell from being editable (visual) at DataGrid? Once click on cell (even readonly) there are cursor inside it and select text appears. How to prevent it Thankx
10
by: Clint | last post by:
Hey all - I'm having a really confusing problem concerning a web service. Right now, I have an application that needs to call a web service that does nothing but return "true" (this will...
4
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml...
0
by: Arun Nair | last post by:
Hi, I have an Employerregistration pagethat is used to add new Empoyers to a table. I also have another form search.aspx used to search the employers(based on their id) and edit the employer...
2
by: Gummy | last post by:
Hello All, I have a webpage that has two dropdown listboxes. Based on what is selected in these dropdown listboxes, it filters a DataGrid . That works fine. In the DataGrid , when I go to edit...
2
by: Vish | last post by:
Hi, I amplanning on having a rea-only and edit states for my form. But it do not want my form and its controls to look different or disabled. I am planning on having a edit button that brings...
2
by: Peter | last post by:
ASP.NET 2003 In the DataGrid how do I select current cell value in the dropdown box when I click on the edit link, currently when I click on the edit link in the DataGrid the dropdown box...
0
by: zeng.hui.stephen | last post by:
I download the demo http://msdn.microsoft.com/msdnmag/issues/02/10/cuttingedge/. I inherite the demo, and write my code. I want to use Hook to monitor C++ Edit change. I use a C# form...
1
by: Brian Heibert | last post by:
Can anyone tell me how to create a Edit menu I am new to VB .Net and this news group Thanks, Brian
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.