Click here to Skip to main content
15,896,154 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to check in form2 if a button on form1 has been clicked Pin
Xmen Real 12-Sep-07 1:24
professional Xmen Real 12-Sep-07 1:24 
GeneralRe: How to check in form2 if a button on form1 has been clicked Pin
Lucy12-Sep-07 1:29
Lucy12-Sep-07 1:29 
GeneralRe: How to check in form2 if a button on form1 has been clicked Pin
Xmen Real 12-Sep-07 1:31
professional Xmen Real 12-Sep-07 1:31 
GeneralRe: How to check in form2 if a button on form1 has been clicked Pin
Lucy12-Sep-07 1:32
Lucy12-Sep-07 1:32 
GeneralRe: How to check in form2 if a button on form1 has been clicked Pin
Xmen Real 12-Sep-07 1:35
professional Xmen Real 12-Sep-07 1:35 
GeneralRe: How to check in form2 if a button on form1 has been clicked Pin
Pete O'Hanlon12-Sep-07 1:49
mvePete O'Hanlon12-Sep-07 1:49 
AnswerRe: How to check in form2 if a button on form1 has been clicked Pin
Anthony Mushrow12-Sep-07 2:02
professionalAnthony Mushrow12-Sep-07 2:02 
AnswerRe: How to check in form2 if a button on form1 has been clicked Pin
Paras Kaneriya12-Sep-07 22:32
Paras Kaneriya12-Sep-07 22:32 
Try using this way

declare a bool variable in form2 with public accessiblity

like
<br />
public bool clicked;<br />

and in the form load event you can check like
<br />
            if (clicked)<br />
            {<br />
                //do whatever you want to do when button1 on form1 is clicked<br />
            }<br />

in form1's button1's click event write
<br />
        private void button1_Click(object sender, EventArgs e)<br />
        {<br />
            Form2 frm = new Form2();<br />
            frm.clicked = true;<br />
            frm.Show();<br />
        }<br />


Paras Kaneriya
The difference between genius and stupidity is that genius has its limits.

Question[Message Deleted] Pin
P_Elza12-Sep-07 0:12
P_Elza12-Sep-07 0:12 
AnswerRe: Go to a particular node. Pin
Mark Churchill12-Sep-07 0:14
Mark Churchill12-Sep-07 0:14 
GeneralRe: Go to a particular node. Pin
P_Elza12-Sep-07 0:56
P_Elza12-Sep-07 0:56 
AnswerRe: Go to a particular node. Pin
Xmen Real 12-Sep-07 1:29
professional Xmen Real 12-Sep-07 1:29 
GeneralRe: Go to a particular node. Pin
P_Elza12-Sep-07 2:12
P_Elza12-Sep-07 2:12 
AnswerRe: Go to a particular node. Pin
Scott Dorman12-Sep-07 8:20
professionalScott Dorman12-Sep-07 8:20 
GeneralRe: Go to a particular node. [modified] Pin
P_Elza12-Sep-07 17:01
P_Elza12-Sep-07 17:01 
QuestionHash Table Pin
Nishad8512-Sep-07 0:07
Nishad8512-Sep-07 0:07 
AnswerRe: Hash Table Pin
mertkan6512-Sep-07 21:13
mertkan6512-Sep-07 21:13 
QuestionDraw gradient image Pin
greekius11-Sep-07 23:51
greekius11-Sep-07 23:51 
AnswerRe: Draw gradient image Pin
Amar Chaudhary12-Sep-07 0:33
Amar Chaudhary12-Sep-07 0:33 
QuestionProblem: tabControl (TabAlignment.Left) Pin
Soo Star11-Sep-07 23:39
Soo Star11-Sep-07 23:39 
AnswerRe: Problem: tabControl (TabAlignment.Left) Pin
Martin#12-Sep-07 8:35
Martin#12-Sep-07 8:35 
Questionequivalent of DocumentCompleted in WebBrowser while loading with AJAX Pin
scoroop11-Sep-07 23:37
scoroop11-Sep-07 23:37 
AnswerRe: equivalent of DocumentCompleted in WebBrowser while loading with AJAX Pin
scoroop12-Sep-07 3:15
scoroop12-Sep-07 3:15 
QuestionC# [DllImport()] questions. Pin
ioctl5111-Sep-07 23:34
ioctl5111-Sep-07 23:34 
AnswerRe: C# [DllImport()] questions. Pin
Malcolm Smart12-Sep-07 0:27
Malcolm Smart12-Sep-07 0:27 

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.