Click here to Skip to main content
15,914,016 members
Home / Discussions / C#
   

C#

 
QuestionHow to access runtime methods of child form Pin
vaibhavnvag7-Jan-07 19:55
vaibhavnvag7-Jan-07 19:55 
AnswerRe: How to access runtime methods of child form Pin
Tyler457-Jan-07 20:20
Tyler457-Jan-07 20:20 
GeneralRe: How to access runtime methods of child form Pin
quiteSmart7-Jan-07 20:34
quiteSmart7-Jan-07 20:34 
AnswerRe: How to access runtime methods of child form Pin
Tyler457-Jan-07 20:47
Tyler457-Jan-07 20:47 
GeneralRe: How to access runtime methods of child form Pin
quiteSmart7-Jan-07 20:55
quiteSmart7-Jan-07 20:55 
GeneralHow to access runtime methods of child form Pin
vaibhavnvag7-Jan-07 22:40
vaibhavnvag7-Jan-07 22:40 
GeneralRe: How to access runtime methods of child form Pin
Christian Graus7-Jan-07 22:58
protectorChristian Graus7-Jan-07 22:58 
AnswerRe: How to access runtime methods of child form Pin
Martin#7-Jan-07 23:03
Martin#7-Jan-07 23:03 
Hello,

First you should build a base Form (BasicForm) from where your Form2 and Form3 inherit.

If save() method in Form2 and Form3 are different:
This BasicForm has than a virtual method save() which is overriden in Form2 and Form3.

If its the same functionality in both forms, you just have to make the method once in BasicForm.

Then in Form1 code you could do:

BasicForm activeForm= this.ActiveMdiChild as BasicForm;

if(activeForm!=null)
{
    activeForm.save();
}


Hope that helps!

All the best,

Martin
GeneralRe: How to access runtime methods of child form Pin
vaibhavnvag7-Jan-07 23:40
vaibhavnvag7-Jan-07 23:40 
QuestionInt32 type alias problem! Pin
Duong Tien Nam7-Jan-07 15:22
Duong Tien Nam7-Jan-07 15:22 
AnswerRe: Int32 type alias problem! Pin
Judah Gabriel Himango7-Jan-07 15:34
sponsorJudah Gabriel Himango7-Jan-07 15:34 
GeneralRe: Int32 type alias problem! Pin
Duong Tien Nam7-Jan-07 15:44
Duong Tien Nam7-Jan-07 15:44 
GeneralRe: Int32 type alias problem! Pin
karam chandrabose7-Jan-07 16:19
karam chandrabose7-Jan-07 16:19 
GeneralRe: Int32 type alias problem! Pin
Judah Gabriel Himango7-Jan-07 16:22
sponsorJudah Gabriel Himango7-Jan-07 16:22 
GeneralRe: Int32 type alias problem! Pin
Christian Graus7-Jan-07 18:01
protectorChristian Graus7-Jan-07 18:01 
GeneralRe: Int32 type alias problem! Pin
Judah Gabriel Himango7-Jan-07 18:06
sponsorJudah Gabriel Himango7-Jan-07 18:06 
GeneralRe: Int32 type alias problem! Pin
Christian Graus7-Jan-07 20:24
protectorChristian Graus7-Jan-07 20:24 
GeneralRe: Int32 type alias problem! Pin
Judah Gabriel Himango8-Jan-07 5:25
sponsorJudah Gabriel Himango8-Jan-07 5:25 
GeneralRe: Int32 type alias problem! Pin
Christian Graus8-Jan-07 8:27
protectorChristian Graus8-Jan-07 8:27 
GeneralRe: Int32 type alias problem! Pin
Scott Dorman8-Jan-07 17:21
professionalScott Dorman8-Jan-07 17:21 
GeneralRe: Int32 type alias problem! Pin
CPallini7-Jan-07 21:43
mveCPallini7-Jan-07 21:43 
GeneralRe: Int32 type alias problem! Pin
leppie8-Jan-07 3:33
leppie8-Jan-07 3:33 
Questionusing SqlDataReader Pin
swjam7-Jan-07 14:22
swjam7-Jan-07 14:22 
AnswerRe: using SqlDataReader Pin
Rama Krishna Vavilala7-Jan-07 14:31
Rama Krishna Vavilala7-Jan-07 14:31 
QuestionHow to persist datareader Pin
AndrusM7-Jan-07 12:31
AndrusM7-Jan-07 12:31 

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.