Click here to Skip to main content
15,889,281 members
Home / Discussions / C#
   

C#

 
QuestionMakecert source code Pin
Paul Strous7-Feb-06 11:59
Paul Strous7-Feb-06 11:59 
QuestionExtract Dataset to Excel Pin
cyrus_thevirus7-Feb-06 11:33
cyrus_thevirus7-Feb-06 11:33 
QuestionSend Text Message to Phone Pin
cyrus_thevirus7-Feb-06 11:27
cyrus_thevirus7-Feb-06 11:27 
AnswerRe: Send Text Message to Phone Pin
Ravi Bhavnani7-Feb-06 11:52
professionalRavi Bhavnani7-Feb-06 11:52 
Questionhow to set textbox1.text in one form from other forms ? Pin
hdv2127-Feb-06 11:24
hdv2127-Feb-06 11:24 
AnswerRe: how to set textbox1.text in one form from other forms ? Pin
DigitalKing7-Feb-06 15:28
DigitalKing7-Feb-06 15:28 
GeneralRe: how to set textbox1.text in one form from other forms ? Pin
hdv2127-Feb-06 17:22
hdv2127-Feb-06 17:22 
GeneralRe: how to set textbox1.text in one form from other forms ? Pin
DigitalKing7-Feb-06 20:14
DigitalKing7-Feb-06 20:14 
this.textbox1.Text = "hello"; needs to be in the constructor of Form1, otherwise textbox1.text will contain the default value "" (nothing) until it is assigned to. Also, the textbox needs to be initialized before this happens.
You might also try telling the label to redraw itself after its text value gets reassigned: this.label1.Invalidate();

//in form 1:
public System.Windows.Forms.TextBox textbox1;

public Form1()
{
    this.textbox1 = new System.Windows.Forms.TextBox();
    ...
    this.textbox1.Text = "hello";
}

//in form 2 (for example):
Form1 f = new Form1();

//this line should display Form1.textbox1.Text in Form2.label1.Text:
this.label1.Text = f.textbox1.Text;
this.label1.Invalidate();


To see if things are working, you can try this:

//in form 1:
public System.Windows.Forms.TextBox textbox1;

public Form1()
{
    this.textbox1 = new System.Windows.Forms.TextBox();
    ...
}

//in form 2 (for example):
Form1 f = new Form1();

f.textbox1.Text="hello"

//this line should display Form1.textbox1.Text in Form2.label1.Text:
this.label1.Text = f.textbox1.Text;
this.label1.Invalidate();

Questionupdate problem Pin
Ado_bado7-Feb-06 11:22
Ado_bado7-Feb-06 11:22 
QuestionDatagrid Context Menu Pin
OrbeaOrca7-Feb-06 10:11
OrbeaOrca7-Feb-06 10:11 
QuestionSendMessage problems Pin
sowhatman007-Feb-06 9:21
sowhatman007-Feb-06 9:21 
AnswerRe: SendMessage problems Pin
sowhatman007-Feb-06 23:54
sowhatman007-Feb-06 23:54 
QuestionCan't get "TreeNodeCollection.Contains" to validate node Pin
JstDaNuGuy7-Feb-06 9:15
JstDaNuGuy7-Feb-06 9:15 
AnswerCan a guy get some help over here??? Pin
JstDaNuGuy8-Feb-06 4:41
JstDaNuGuy8-Feb-06 4:41 
QuestionGroupbox border color Pin
VPMahank7-Feb-06 8:53
VPMahank7-Feb-06 8:53 
AnswerRe: Groupbox border color Pin
DigitalKing7-Feb-06 15:32
DigitalKing7-Feb-06 15:32 
QuestionCustom Object that has 'nested' collections Pin
kloepper7-Feb-06 8:52
kloepper7-Feb-06 8:52 
AnswerRe: Custom Object that has 'nested' collections Pin
Guffa7-Feb-06 9:16
Guffa7-Feb-06 9:16 
GeneralRe: Custom Object that has 'nested' collections Pin
kloepper7-Feb-06 9:46
kloepper7-Feb-06 9:46 
AnswerRe: Custom Object that has 'nested' collections Pin
Guffa7-Feb-06 10:56
Guffa7-Feb-06 10:56 
QuestionInclude files Pin
dvsr7-Feb-06 8:51
dvsr7-Feb-06 8:51 
AnswerRe: Include files Pin
Guffa7-Feb-06 9:21
Guffa7-Feb-06 9:21 
GeneralRe: Include files Pin
dvsr8-Feb-06 4:43
dvsr8-Feb-06 4:43 
AnswerRe: Include files Pin
Guffa8-Feb-06 6:07
Guffa8-Feb-06 6:07 
QuestionHRESULT E_FAIL Error? Pin
Mertli Ozgur Nevres7-Feb-06 6:36
Mertli Ozgur Nevres7-Feb-06 6: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.