Click here to Skip to main content
15,919,358 members
Home / Discussions / C#
   

C#

 
QuestionHi how i can check the Service Exist or Not Pin
wasimsharp6-Jul-08 20:40
wasimsharp6-Jul-08 20:40 
AnswerRe: Hi how i can check the Service Exist or Not Pin
stancrm6-Jul-08 21:28
stancrm6-Jul-08 21:28 
AnswerRe: Hi how i can check the Service Exist or Not [modified] Pin
Samer Aburabie7-Jul-08 2:45
Samer Aburabie7-Jul-08 2:45 
QuestionComplete Novice Question Pin
killabyte6-Jul-08 19:56
killabyte6-Jul-08 19:56 
AnswerRe: Complete Novice Question Pin
J a a n s6-Jul-08 21:03
professionalJ a a n s6-Jul-08 21:03 
GeneralRe: Complete Novice Question Pin
killabyte6-Jul-08 22:55
killabyte6-Jul-08 22:55 
QuestionSetup and deployment Pin
D i x y6-Jul-08 19:36
D i x y6-Jul-08 19:36 
AnswerRe: Setup and deployment Pin
stancrm6-Jul-08 20:32
stancrm6-Jul-08 20:32 
QuestionHelp for Crystal Report Pin
psohid6-Jul-08 17:38
psohid6-Jul-08 17:38 
AnswerRe: Help for Crystal Report Pin
Christian Graus6-Jul-08 17:49
protectorChristian Graus6-Jul-08 17:49 
AnswerRe: Help for Crystal Report Pin
D i x y6-Jul-08 18:26
D i x y6-Jul-08 18:26 
QuestionGet All IP Addresses and MAC Addresses Pin
kikijas6-Jul-08 16:38
kikijas6-Jul-08 16:38 
QuestionRe: Get All IP Addresses and MAC Addresses Pin
kikijas7-Jul-08 15:03
kikijas7-Jul-08 15:03 
Questionpath Pin
nelsonpaixao6-Jul-08 13:30
nelsonpaixao6-Jul-08 13:30 
AnswerRe: path Pin
Bram van Kampen6-Jul-08 14:02
Bram van Kampen6-Jul-08 14:02 
QuestionRead Excel Pin
mehrdadc486-Jul-08 9:08
mehrdadc486-Jul-08 9:08 
AnswerRe: Read Excel Pin
Christian Graus6-Jul-08 9:19
protectorChristian Graus6-Jul-08 9:19 
AnswerRe: Read Excel Pin
DaveyM696-Jul-08 9:26
professionalDaveyM696-Jul-08 9:26 
AnswerRe: Read Excel Pin
5do86-Jul-08 16:24
5do86-Jul-08 16:24 
GeneralRe: Read Excel Pin
Christian Graus6-Jul-08 16:40
protectorChristian Graus6-Jul-08 16:40 
QuestionDisable form when closing child form Pin
Deresen6-Jul-08 7:05
Deresen6-Jul-08 7:05 
Hello everyone,

I have an question about forms in C#.
This is a problem which I have had since the start of programming in C#.

This is the problem:
In the (main) Form there is a button to open another (child) Form.
But when I use that Form I would like to have the main Form to be enabled. This is no problem. But when I close the child Form I would like to disable the main Form.
But I want the main form to do this.

So not something like this:
//Form main:
public void createForm(){
Child child = new Child(this);
child.show();
this.Enabled = true;
}
public void show(){
this.Enabled = false;
}
//Form child
public Child(Main m){
this.main = m;
}
public void Dispose(){
main.show();
}


I would rather like to have something like this:
//Form main
public void createForm(){
Child child = new Child();
child.show();
this.Enabled = true;
}
public void child_Disposed(object sender, EventArgs e){
this.Enabled = false;
}


If I'm not wrong, I'll have to work with delegates. But I don't know how, can somebody help me?
AnswerRe: Disable form when closing child form Pin
Harvey Saayman6-Jul-08 7:28
Harvey Saayman6-Jul-08 7:28 
AnswerRe: Disable form when closing child form Pin
N a v a n e e t h6-Jul-08 7:29
N a v a n e e t h6-Jul-08 7:29 
Questionproblem with converting to Double Pin
Rick van Woudenberg6-Jul-08 7:01
Rick van Woudenberg6-Jul-08 7:01 
AnswerRe: problem with converting to Double Pin
Deresen6-Jul-08 7:13
Deresen6-Jul-08 7:13 

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.