Click here to Skip to main content
15,911,789 members
Home / Discussions / C#
   

C#

 
AnswerRe: StatusStrip Label to the right Pin
AETaylor25-May-06 20:57
AETaylor25-May-06 20:57 
QuestionIcon in MainMenu (IE style) Pin
SigmaMP25-May-06 4:33
SigmaMP25-May-06 4:33 
AnswerRe: Icon in MainMenu (IE style) Pin
Josh Smith25-May-06 7:52
Josh Smith25-May-06 7:52 
QuestionCustom SNMP Agent development Pin
mikeyhardingboyo25-May-06 4:31
mikeyhardingboyo25-May-06 4:31 
QuestionTiff Image -> Searchable PDF [modified] Pin
abcxyz8225-May-06 4:09
abcxyz8225-May-06 4:09 
AnswerRe: Tiff Image -> Searchable PDF Pin
Sumit_Ghosh15-Aug-09 13:12
Sumit_Ghosh15-Aug-09 13:12 
Questionweb service - need help Pin
dpietro25-May-06 4:08
dpietro25-May-06 4:08 
Questionhelp needed for passing data between forms ? Pin
cmpeng3425-May-06 3:03
cmpeng3425-May-06 3:03 
hi all,
firstly:
>i defined a textbox1 on form1 passed on form2 and created form2 like this:
Form2 mehmet = new Form2(textBox1.Text);
mehmet.show();
>and form2's contructor :
public Form2(string s)
{
InitializeComponent();
lblUserName.Text = s;
lblLoginTime.Text = Convert.ToDateTime(DateTime.Now.TimeOfDay.ToString()).ToString("HH:mm:ss");
}
till now everything is fine Wink | ;)
what if i want to use that 'text' in another function or class ?
do i have to assign them to different variables in constructor first ???
and what if i have to pass not just one value but many values between forms ???
> is there a more sophisticated way ? or this is the method everyone uses ?


secondly: i defined that textbox1 (on form1) as public and in form2 defined something like this :

Form1 x = new Form1();
lblUserName.Text = x.textBox1.Text; > gives nothing ;(

lblUserName.Text is an empty string ??? cant i get the string value of textbox1 from form1 to form2 by setting it to public ???
where am i doing wrong ???
thanks in advance,
bye.
AnswerRe: help needed for passing data between forms ? Pin
maryamf25-May-06 3:35
maryamf25-May-06 3:35 
AnswerRe: help needed for passing data between forms ? Pin
Guffa25-May-06 3:48
Guffa25-May-06 3:48 
AnswerRe: help needed for passing data between forms ? Pin
S. Senthil Kumar25-May-06 7:58
S. Senthil Kumar25-May-06 7:58 
AnswerRe: help needed for passing data between forms ? Pin
Guffa25-May-06 21:51
Guffa25-May-06 21:51 
AnswerRe: help needed for passing data between forms ? Pin
Member 337352012-Feb-09 18:27
Member 337352012-Feb-09 18:27 
QuestionDisable Text Zoom in RichTextBox on Mouse Wheel Pin
kaushik_aj25-May-06 2:56
kaushik_aj25-May-06 2:56 
QuestionOnKeyDown & OnKeyUp events are never called Pin
compubaby25-May-06 2:56
compubaby25-May-06 2:56 
AnswerRe: OnKeyDown & OnKeyUp events are never called Pin
Daniele Ferrero25-May-06 4:42
Daniele Ferrero25-May-06 4:42 
GeneralRe: OnKeyDown & OnKeyUp events are never called Pin
compubaby26-May-06 11:14
compubaby26-May-06 11:14 
GeneralRe: OnKeyDown & OnKeyUp events are never called Pin
compubaby27-May-06 1:17
compubaby27-May-06 1:17 
QuestionDisplaying Pin
dayakar_dn25-May-06 2:55
dayakar_dn25-May-06 2:55 
QuestionWriting thousands of images to disk Pin
Emiliano25-May-06 2:25
Emiliano25-May-06 2:25 
AnswerRe: Writing thousands of images to disk Pin
J4amieC25-May-06 2:40
J4amieC25-May-06 2:40 
GeneralRe: Writing thousands of images to disk Pin
Emiliano25-May-06 3:02
Emiliano25-May-06 3:02 
GeneralRe: Writing thousands of images to disk Pin
J4amieC25-May-06 3:50
J4amieC25-May-06 3:50 
AnswerRe: Writing thousands of images to disk [modified] Pin
Judah Gabriel Himango25-May-06 5:45
sponsorJudah Gabriel Himango25-May-06 5:45 
GeneralRe: Writing thousands of images to disk [modified] Pin
Emiliano25-May-06 6:23
Emiliano25-May-06 6:23 

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.