Click here to Skip to main content
15,899,124 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have tried (for hours now) searching on Google for the answer to my problem without any joy - My biggest problem, I think, is not knowing what keywords to search for.
I have also searched thru Code Project without any luck (though I am sure the answer resides there somewhere)

I have a few programs that each have a Help option on the Menu Bar. When this is clicked a new 'Help' window is opened (that obviously shows the help content)
This works well, except that the user has to read the help content, close the Help window and then apply what he/she has read.

What I would like to achieve is :
User clicks Help on parent window
Program opens another window (Help window)
User is able to click on parent window (ie get focus) and Help window 'goes behind' parent window
User can then click on Help window again to get focus
and so flip flop between the two until finished with Help window and clicks on Close button
If user does not close help window and closes parent window then both should be closed.

Is this possible? And how?

Currently I am using VB2010 (.Net Windows applications) and open with Help window with
VB
frm_Help.ShowDialog()

and then close the Help window when a button is clicked with
VB
Me.Close()


Any assistance or pointers would be greatly appreciated.
Posted

1 solution

Try Show instead of ShowDialog - it doesn't wait for the form to close before continuing.
You might want to add the Form.TopMost = True as well, and possibly add a FormClosing event handler so that you only show one form if the user requests it twice.
 
Share this answer
 
Comments
Darrell de Wet 14-May-13 7:07am    
Ahh great - easy if you know how.

On which form do I add Form.TopMost = True (parent or called form)?

And thanks for the FormClosing advice - never thought of that.

Your assistance much appreciated.
OriginalGriff 14-May-13 7:37am    
Probably on your help form, so it is visible while the user types into the main form. (It means that the form should never go behind forms which do not have it set to true)

You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900