Click here to Skip to main content
15,905,504 members
Home / Discussions / C#
   

C#

 
AnswerRe: form.close() not working Pin
Christian Graus7-Feb-07 14:33
protectorChristian Graus7-Feb-07 14:33 
GeneralRe: form.close() not working Pin
red60mans7-Feb-07 14:58
red60mans7-Feb-07 14:58 
GeneralRe: form.close() not working Pin
Luc Pattyn7-Feb-07 15:04
sitebuilderLuc Pattyn7-Feb-07 15:04 
GeneralRe: form.close() not working Pin
Christian Graus7-Feb-07 15:14
protectorChristian Graus7-Feb-07 15:14 
GeneralRe: form.close() not working Pin
Christian Graus7-Feb-07 15:15
protectorChristian Graus7-Feb-07 15:15 
QuestionRe: form.close() not working Pin
red60mans7-Feb-07 17:24
red60mans7-Feb-07 17:24 
AnswerRe: form.close() not working Pin
ShermansLagoon7-Feb-07 21:00
ShermansLagoon7-Feb-07 21:00 
AnswerRe: form.close() not working Pin
Christian Graus7-Feb-07 21:09
protectorChristian Graus7-Feb-07 21:09 
red60mans wrote:
How do i access Form1 from Form2 without creating a new instance of Form1??


You can't create a new instance, it won't access the old one. The Application object does have a collection of open forms, you could find it there. You could also pass it in, as has been suggested. You could use a delegate to make Form2 tell form1 to wake up. Your best bet IMO is still to create both forms as controls, and embedd them on the one form.


red60mans wrote:
where do i create those controls??


You create new user controls, and design them the same as you would a form. Then you put both controls on your form, and write some plumbing code to make sure one or the other is always visible.


red60mans wrote:
So do i need to create these forms as controls in main()??


You'd create them as controls in the designer, and then add them to your form


Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog

QuestionSpace Elevator Problem Pin
Member 38066887-Feb-07 13:34
Member 38066887-Feb-07 13:34 
AnswerRe: Space Elevator Problem Pin
Dave Kreskowiak7-Feb-07 14:09
mveDave Kreskowiak7-Feb-07 14:09 
AnswerRe: Space Elevator Problem [modified] Pin
Not Active7-Feb-07 14:11
mentorNot Active7-Feb-07 14:11 
GeneralRe: Space Elevator Problem Pin
Christian Graus7-Feb-07 14:16
protectorChristian Graus7-Feb-07 14:16 
GeneralRe: Space Elevator Problem Pin
Not Active7-Feb-07 14:23
mentorNot Active7-Feb-07 14:23 
AnswerRe: Space Elevator Problem Pin
Christian Graus7-Feb-07 14:15
protectorChristian Graus7-Feb-07 14:15 
QuestionLeave event not firing Pin
kumar.bs7-Feb-07 13:32
kumar.bs7-Feb-07 13:32 
AnswerRe: Leave event not firing Pin
Dave Kreskowiak7-Feb-07 14:05
mveDave Kreskowiak7-Feb-07 14:05 
GeneralRe: Leave event not firing Pin
kumar.bs7-Feb-07 14:27
kumar.bs7-Feb-07 14:27 
QuestionListbox Help Pin
Saamir7-Feb-07 12:07
Saamir7-Feb-07 12:07 
QuestionDeep copy and shallow copy with List<> [modified] Pin
jeffb427-Feb-07 10:51
jeffb427-Feb-07 10:51 
QuestionCheck for an existing item in a treeview Pin
sharpiesharpie7-Feb-07 9:43
sharpiesharpie7-Feb-07 9:43 
AnswerRe: Check for an existing item in a treeview Pin
led mike7-Feb-07 9:48
led mike7-Feb-07 9:48 
GeneralRe: Check for an existing item in a treeview Pin
sharpiesharpie7-Feb-07 9:51
sharpiesharpie7-Feb-07 9:51 
AnswerRe: Check for an existing item in a treeview Pin
PIEBALDconsult7-Feb-07 10:00
mvePIEBALDconsult7-Feb-07 10:00 
GeneralRe: Check for an existing item in a treeview Pin
sharpiesharpie8-Feb-07 1:25
sharpiesharpie8-Feb-07 1:25 
AnswerRe: Check for an existing item in a treeview Pin
Ravi Bhavnani7-Feb-07 11:13
professionalRavi Bhavnani7-Feb-07 11: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.