Click here to Skip to main content
16,004,991 members
Home / Discussions / C#
   

C#

 
QuestionMainwindowHandle of a screensaver Pin
topcatalpha16-Feb-07 0:26
topcatalpha16-Feb-07 0:26 
Questionhow to make an child form of an mdi form in c# Pin
monuSaini15-Feb-07 23:58
monuSaini15-Feb-07 23:58 
AnswerRe: how to make an child form of an mdi form in c# Pin
Michael Sync16-Feb-07 0:13
Michael Sync16-Feb-07 0:13 
GeneralRe: how to make an child form of an mdi form in c# Pin
monuSaini16-Feb-07 0:19
monuSaini16-Feb-07 0:19 
GeneralRe: how to make an child form of an mdi form in c# Pin
Stefan Troschuetz16-Feb-07 0:50
Stefan Troschuetz16-Feb-07 0:50 
AnswerRe: how to make an child form of an mdi form in c# Pin
topcatalpha16-Feb-07 0:21
topcatalpha16-Feb-07 0:21 
GeneralRe: how to make an child form of an mdi form in c# Pin
monuSaini16-Feb-07 0:29
monuSaini16-Feb-07 0:29 
GeneralRe: how to make an child form of an mdi form in c# Pin
topcatalpha16-Feb-07 0:39
topcatalpha16-Feb-07 0:39 
Your form declaration should be in the class, not in the onload.
but probably you have declared a new variable form2 in your form1

make an event in form1.. wich is called in your buttonClick.

public delegate void OnCreateForm2()
public event OnCreateForm2 OnCreateForm2Event


in the buttonclick call the event

if (OnCreateForm2Event != null)
OnCreateForm2Event()

assign the event in your mainform where you created it.

objForm1 = new form1();
objForm1.mdiParent = this;
objForm1.OnCreateForm2Event += OnCreateform2eventinMain

OnCreateform2eventinMain is a method in your mainform where you put the code

public void OnCreateform2eventinMain()
{
objForm2 = new form2();
objForm2.mdiParent = this;
}

this should do...

greetz

kurt

AnswerRe: how to make an child form of an mdi form in c# Pin
vignesh ravikumar16-Feb-07 1:31
vignesh ravikumar16-Feb-07 1:31 
Question"interface and abstract" Pin
ravikiranreddydharmannagari15-Feb-07 23:58
ravikiranreddydharmannagari15-Feb-07 23:58 
AnswerRe: "interface and abstract" Pin
Stefan Troschuetz16-Feb-07 0:17
Stefan Troschuetz16-Feb-07 0:17 
AnswerRe: "interface and abstract" [modified] Pin
Parwej Ahamad16-Feb-07 0:22
professionalParwej Ahamad16-Feb-07 0:22 
GeneralRe: "interface and abstract" Pin
Daniel Turini16-Feb-07 5:54
Daniel Turini16-Feb-07 5:54 
GeneralRe: "interface and abstract" Pin
Parwej Ahamad16-Feb-07 7:10
professionalParwej Ahamad16-Feb-07 7:10 
GeneralRe: "interface and abstract" Pin
Daniel Turini19-Feb-07 11:46
Daniel Turini19-Feb-07 11:46 
AnswerRe: "interface and abstract" Pin
Michael Sync16-Feb-07 0:37
Michael Sync16-Feb-07 0:37 
AnswerRe: "interface and abstract" Pin
LogiPro10125-Jan-09 11:30
LogiPro10125-Jan-09 11:30 
Questionabout threading Pin
Abhishek Joshi15-Feb-07 23:48
Abhishek Joshi15-Feb-07 23:48 
AnswerRe: about threading Pin
Stefan Troschuetz16-Feb-07 0:13
Stefan Troschuetz16-Feb-07 0:13 
AnswerRe: about threading Pin
ednrgc16-Feb-07 8:10
ednrgc16-Feb-07 8:10 
GeneralRe: about threading Pin
Luc Pattyn16-Feb-07 9:57
sitebuilderLuc Pattyn16-Feb-07 9:57 
QuestionConvert Jpeg to Mime Pin
Russell Jones15-Feb-07 23:44
Russell Jones15-Feb-07 23:44 
Questionscripting client side Pin
kalyan_241615-Feb-07 22:22
kalyan_241615-Feb-07 22:22 
AnswerRe: scripting client side Pin
Sylvester george15-Feb-07 22:28
Sylvester george15-Feb-07 22:28 
GeneralRe: scripting client side Pin
kalyan_241616-Feb-07 16:46
kalyan_241616-Feb-07 16:46 

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.