Click here to Skip to main content
15,904,153 members
Home / Discussions / C#
   

C#

 
AnswerCP IGNORE THIS COMPLETE IDIOT FOREVER AND EVER AND EVER!!!!!!!!!!!!!!!!!!!!!!!!!! Pin
leckey13-Jan-09 9:04
leckey13-Jan-09 9:04 
GeneralAgreed! Pin
DaveyM6913-Jan-09 9:36
professionalDaveyM6913-Jan-09 9:36 
GeneralRe: Agreed! Pin
leckey13-Jan-09 9:38
leckey13-Jan-09 9:38 
AnswerRe: how can made clinic project in c#.net?HOW CAN EASY LEANING VISUAL STUDIO .NET 2003 OR 2005? Pin
scottgp13-Jan-09 9:38
professionalscottgp13-Jan-09 9:38 
QuestionInitiating a process from child Pin
Lodeclaw13-Jan-09 6:41
Lodeclaw13-Jan-09 6:41 
AnswerRe: Initiating a process from child Pin
musefan13-Jan-09 7:05
musefan13-Jan-09 7:05 
GeneralRe: Initiating a process from child Pin
Lodeclaw13-Jan-09 8:56
Lodeclaw13-Jan-09 8:56 
GeneralRe: Initiating a process from child Pin
musefan13-Jan-09 22:26
musefan13-Jan-09 22:26 
I dont think you can take another approach. If you want to do something, when another form changes you need to listen for that change.

I dont know what your exact requirements are but perhaps you could use static functions in another class. Or just call the function by accessing the child forms parent form.

something like (though i have not tested):

FormOfTypeParent parentForm = (FormOfTypeParent)this.ParentForm;
parentForm.MyFunction();



FormOfTypeParent = the form type that is your parent form i.e. MainForm, Form1 etc.

calling this when a variable changes, make the variable a property i.e.

private bool changingThing = false;

public bool ChangingThing{
get{return changingThing;}
set{changingThing = value;ProcessChange();}
}

private void ProcessChange()
{
if(changingThing)
{
FormOfTypeParent parentForm = (FormOfTypeParent)this.ParentForm;
parentForm.MyFunction();
}
}

QuestionRe: Initiating a process from child Pin
Lodeclaw14-Jan-09 5:31
Lodeclaw14-Jan-09 5:31 
Questionincreasing number of panels dynamically Pin
jananiSreedhar13-Jan-09 6:12
jananiSreedhar13-Jan-09 6:12 
AnswerRe: increasing number of panels dynamically Pin
EliottA13-Jan-09 6:15
EliottA13-Jan-09 6:15 
AnswerRe: increasing number of panels dynamically Pin
Wendelius13-Jan-09 6:16
mentorWendelius13-Jan-09 6:16 
AnswerRe: increasing number of panels dynamically [modified] Pin
Luc Pattyn13-Jan-09 6:43
sitebuilderLuc Pattyn13-Jan-09 6:43 
AnswerRe: increasing number of panels dynamically Pin
dan!sh 13-Jan-09 7:13
professional dan!sh 13-Jan-09 7:13 
AnswerCP IGNORE: Second time asking the question. Pin
leckey13-Jan-09 9:05
leckey13-Jan-09 9:05 
QuestionTrueType font files Pin
Member 63398313-Jan-09 4:23
Member 63398313-Jan-09 4:23 
AnswerRe: TrueType font files Pin
Wendelius13-Jan-09 4:37
mentorWendelius13-Jan-09 4:37 
AnswerRe: TrueType font files Pin
EliottA13-Jan-09 4:38
EliottA13-Jan-09 4:38 
QuestionTerminate Process / Application on remote machine Pin
Programm3r13-Jan-09 4:13
Programm3r13-Jan-09 4:13 
AnswerRe: Terminate Process / Application on remote machine Pin
EliottA13-Jan-09 4:18
EliottA13-Jan-09 4:18 
GeneralRe: Terminate Process / Application on remote machine Pin
Programm3r13-Jan-09 4:37
Programm3r13-Jan-09 4:37 
GeneralRe: Terminate Process / Application on remote machine Pin
EliottA13-Jan-09 4:39
EliottA13-Jan-09 4:39 
GeneralRe: Terminate Process / Application on remote machine Pin
Programm3r13-Jan-09 4:53
Programm3r13-Jan-09 4:53 
GeneralRe: Terminate Process / Application on remote machine Pin
leckey13-Jan-09 6:26
leckey13-Jan-09 6:26 
AnswerRe: Terminate Process / Application on remote machine Pin
dan!sh 13-Jan-09 5:16
professional dan!sh 13-Jan-09 5:16 

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.