how to keep a form always active
-
hi all i have 2 form form1 and form2 i m trying to keep the form2 always active how can i do it
I'm assuming that form2 is a child of form1 and is being shown modelessly ? You could put focus back onto form2 whenever it loses it, but if you do that, what's the point of it being modeless ? A form cannot be active if you're interacting with another one.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
I'm assuming that form2 is a child of form1 and is being shown modelessly ? You could put focus back onto form2 whenever it loses it, but if you do that, what's the point of it being modeless ? A form cannot be active if you're interacting with another one.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
my use of that form is as a toolbar that's why i need to keep the form always active because without that i need to click twice first to activate the form and second to use the control on the form
That sounds odd to me, you should be able to click on a control in your form, and it should select the form and the control.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
my use of that form is as a toolbar that's why i need to keep the form always active because without that i need to click twice first to activate the form and second to use the control on the form
-
ya i have tryed i need some code to be executed on a click event now when the form lost its focus i need to click twice first to activate the form and the second to click on that button and i need only to click once to activate the form as well as to click the button.
-
hi all i have 2 form form1 and form2 i m trying to keep the form2 always active how can i do it
-
my use of that form is as a toolbar that's why i need to keep the form always active because without that i need to click twice first to activate the form and second to use the control on the form
You may want to try setting the "ToolBox" form's TopLevel property to False, then add an instance of that form to the Controls collection of the main form.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007