Click here to Skip to main content
15,918,596 members
Home / Discussions / C#
   

C#

 
AnswerRe: event form Pin
Luc Pattyn15-Jun-07 12:22
sitebuilderLuc Pattyn15-Jun-07 12:22 
GeneralRe: event form Pin
SVb.net16-Jun-07 22:01
SVb.net16-Jun-07 22:01 
GeneralRe: event form Pin
Luc Pattyn17-Jun-07 0:50
sitebuilderLuc Pattyn17-Jun-07 0:50 
QuestionKeystroke Re-mapping and Passthrough App Pin
thecodedemon15-Jun-07 11:18
thecodedemon15-Jun-07 11:18 
AnswerRe: Keystroke Re-mapping and Passthrough App Pin
Giorgi Dalakishvili15-Jun-07 11:48
mentorGiorgi Dalakishvili15-Jun-07 11:48 
QuestionFileSystemWatcher does not raise events Pin
AndrusM15-Jun-07 11:10
AndrusM15-Jun-07 11:10 
AnswerRe: FileSystemWatcher does not raise events Pin
Luc Pattyn15-Jun-07 11:50
sitebuilderLuc Pattyn15-Jun-07 11:50 
QuestionInteresting reference problem Pin
Rick van Woudenberg15-Jun-07 9:25
Rick van Woudenberg15-Jun-07 9:25 
Dear all,

I've got a problem that I just cannot figure out. I must have tried just about everything. I'm hoping that one of you can help me out here.

My main application has got a form referenced, like this :

private Control control1;

This will allow me to call a method inside the form Control , like this :

private void Click(Object sender, EventArgs e)<br />
{<br />
control1.Method();<br />
}


Works perfect. The method on the form Control is executed.


The problem :

I created another form , that I call from inside the form Control :

private void Click_button(Object sender, EventArgs e)<br />
{<br />
ChildForm child = new ChildForm();<br />
child.Show;<br />
}


In that child form I also have got the same Control form referenced, because I want to call the same method exactly the same way as I would from the main application :

private Control control1

and a method to call the method on the Control form.

private void InvokeMethodOnControl()<br />
{<br />
Control.Hello = "a value";<br />
control1.Method();<br />
}


Only the value Control.Hello is passed back to the Control form ( in which I have a public string referenced ( public static string Hello; ) but the Method ( control1.Method()) is not executed.

Can anyone tell me what I am doing wrong ? .. this is giving me a headache.

Kind regards,
AnswerRe: Interesting reference problem Pin
Luc Pattyn15-Jun-07 10:38
sitebuilderLuc Pattyn15-Jun-07 10:38 
AnswerRe: Interesting reference problem Pin
tarun suneja15-Jun-07 11:14
tarun suneja15-Jun-07 11:14 
AnswerRe: Interesting reference problem Pin
DavidNohejl15-Jun-07 11:26
DavidNohejl15-Jun-07 11:26 
AnswerRe: Interesting reference problem ( example ) Pin
Rick van Woudenberg15-Jun-07 14:13
Rick van Woudenberg15-Jun-07 14:13 
GeneralRe: Interesting reference problem ( example ) Pin
Luc Pattyn15-Jun-07 14:52
sitebuilderLuc Pattyn15-Jun-07 14:52 
GeneralRe: Interesting reference problem ( example ) Pin
Rick van Woudenberg16-Jun-07 1:01
Rick van Woudenberg16-Jun-07 1:01 
GeneralRe: reference problem [modified] Pin
Luc Pattyn16-Jun-07 1:29
sitebuilderLuc Pattyn16-Jun-07 1:29 
Questioncombobox Pin
topksharma198215-Jun-07 8:48
topksharma198215-Jun-07 8:48 
Questionsocket server Pin
topksharma198215-Jun-07 8:40
topksharma198215-Jun-07 8:40 
QuestionScrollable and Moveable Frames Pin
Syed Shahid Hussain15-Jun-07 7:58
Syed Shahid Hussain15-Jun-07 7:58 
AnswerRe: Scrollable and Moveable Frames Pin
Tarakeshwar Reddy15-Jun-07 8:15
professionalTarakeshwar Reddy15-Jun-07 8:15 
GeneralRe: Scrollable and Moveable Frames Pin
Syed Shahid Hussain15-Jun-07 14:58
Syed Shahid Hussain15-Jun-07 14:58 
GeneralA concepteual question Pin
Amar Chaudhary15-Jun-07 6:56
Amar Chaudhary15-Jun-07 6:56 
GeneralRe: A concepteual question Pin
bolhassanim@bellsouth.net15-Jun-07 7:12
professionalbolhassanim@bellsouth.net15-Jun-07 7:12 
GeneralRe: A concepteual question Pin
Shy Agam15-Jun-07 7:15
Shy Agam15-Jun-07 7:15 
GeneralRe: A concepteual question Pin
Amar Chaudhary15-Jun-07 7:25
Amar Chaudhary15-Jun-07 7:25 
QuestionNon-order-dependent deserialization of objects Pin
Shy Agam15-Jun-07 6:36
Shy Agam15-Jun-07 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.