Click here to Skip to main content
15,921,716 members
Home / Discussions / C#
   

C#

 
GeneralRe: Window Message Pin
sachinkalse13-Jul-04 16:16
sachinkalse13-Jul-04 16:16 
GeneralRe: Window Message Pin
Heath Stewart14-Jul-04 3:01
protectorHeath Stewart14-Jul-04 3:01 
QuestionRegistering classes with a class factory? Pin
Scythen12-Jul-04 18:01
Scythen12-Jul-04 18:01 
AnswerRe: Registering classes with a class factory? Pin
Heath Stewart13-Jul-04 5:46
protectorHeath Stewart13-Jul-04 5:46 
GeneralSecurity Access Error Pin
dbetting12-Jul-04 16:48
dbetting12-Jul-04 16:48 
GeneralRe: Security Access Error Pin
Nick Parker12-Jul-04 17:22
protectorNick Parker12-Jul-04 17:22 
Generalcode for adding Pin
stevemasters2212-Jul-04 13:58
stevemasters2212-Jul-04 13:58 
GeneralRe: code for adding Pin
KevinMac12-Jul-04 17:01
KevinMac12-Jul-04 17:01 
Hey Steve I am a little vague on what you are wanting to do.

Do you plan on using the standard TextChanged event or are you trying to build your own event.

this.textBox3.TextChanged += new System.EventHandler(this.CalcTotal);

private void CalcTotal(object sender, System.EventArgs e)
{
textBox1.Text =Convert.ToString(Convert.ToDecimal(textBox2.Text) + Convert.ToDecimal(textBox3.Text));

Now if you are wanting to add the textboxes at runtime and code the event that a little more fun. Create a member variable then initialize it. Be sure and add it to the Controls collection.

private System.Windows.Forms.TextBox textBox4 = new TextBox();

private System.ComponentModel.Container components = null;

public Form2()
{// initilize it in the constructor

textBox4.Location = new System.Drawing.Point(184, 154);
textBox4.Name = "textBox4";
textBox4.TabIndex = 3;
textBox4.Text = "0.00";
textBox4.TextChanged += new System.EventHandler(this.CalcTotal);
this.Controls.Add(textBox4);

InitializeComponent();
}

I don't know if this helps but good luck.


GeneralRe: code for adding Pin
stevemasters2212-Jul-04 17:27
stevemasters2212-Jul-04 17:27 
GeneralRe: code for adding Pin
Nick Parker12-Jul-04 17:50
protectorNick Parker12-Jul-04 17:50 
GeneralRe: code for adding Pin
stevemasters2212-Jul-04 20:54
stevemasters2212-Jul-04 20:54 
GeneralRe: code for adding Pin
Nick Parker13-Jul-04 7:10
protectorNick Parker13-Jul-04 7:10 
GeneralEventHandler problem Pin
Jae Sammy12-Jul-04 13:33
Jae Sammy12-Jul-04 13:33 
GeneralRe: EventHandler problem Pin
Nick Parker12-Jul-04 14:21
protectorNick Parker12-Jul-04 14:21 
GeneralRe: EventHandler problem Pin
Jae Sammy12-Jul-04 18:19
Jae Sammy12-Jul-04 18:19 
GeneralRe: EventHandler problem Pin
Jae Sammy13-Jul-04 5:39
Jae Sammy13-Jul-04 5:39 
GeneralRe: EventHandler problem Pin
Nick Parker13-Jul-04 7:16
protectorNick Parker13-Jul-04 7:16 
GeneralRe: EventHandler problem Pin
Jae Sammy13-Jul-04 7:40
Jae Sammy13-Jul-04 7:40 
GeneralRe: EventHandler problem Pin
Nick Parker13-Jul-04 8:29
protectorNick Parker13-Jul-04 8:29 
GeneralRe: EventHandler problem Pin
Jay Shankar12-Jul-04 20:05
Jay Shankar12-Jul-04 20:05 
GeneralProblem with System.Management Pin
Jacob Bang12-Jul-04 12:21
Jacob Bang12-Jul-04 12:21 
GeneralRe: Problem with System.Management Pin
eggie512-Jul-04 12:54
eggie512-Jul-04 12:54 
GeneralRe: Problem with System.Management Pin
Nick Parker12-Jul-04 13:07
protectorNick Parker12-Jul-04 13:07 
Generaldll in subdir Pin
elraton12-Jul-04 11:22
elraton12-Jul-04 11:22 
GeneralRe: dll in subdir Pin
Dave Kreskowiak12-Jul-04 13:36
mveDave Kreskowiak12-Jul-04 13:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.