floating toolbar

A

ar

hI,
Im having some trouble with creating a floating toolbar in vb.net, I do not
want to use the toolbar control because I want to include other controls on
my toolbar, not just toolbar buttons.

I'm creating a Form based toolbar, a Form that is owned by a MDI control,
but I have some problems.
How can I keep 2 forms active at the same time, for example when I click the
toolbar form, its parent loses focus and when I click the MDI parent, the
toolbar loses focus. How can I fix this?



Thanks
 
H

Herfried K. Wagner [MVP]

* "ar said:
Im having some trouble with creating a floating toolbar in vb.net, I do not
want to use the toolbar control because I want to include other controls on
my toolbar, not just toolbar buttons.

I'm creating a Form based toolbar, a Form that is owned by a MDI control,
but I have some problems.
How can I keep 2 forms active at the same time, for example when I click the
toolbar form, its parent loses focus and when I click the MDI parent, the
toolbar loses focus. How can I fix this?

"Professional solutions":

<http://www.infragistics.com/>
<http://www.dotnetmagic.com/>
<http://www.devcomponents.com/dotnetbar/>

<http://msdn.microsoft.com/vbasic/vbrkit/default.aspx>
 
G

Guest

You toolbar shouldn't get the focus in the first place... To have that, you must override the WndProc method and set some hooks on some of the windows messages like WM_MOUSEACTIVATE, WM_ACTIVATE and all the other mouse related functions. You must let them thru without allowing the form to get the focus. The problem is that you must do the same thing for EACH control placed on your form otherwise the controls will drag the focus onto their parent form. So each control has to be a derived control with the WndProc overriden and with the WM_ messages hooked. I remember that in the case of WM_MOUSEACTIVATE you must set the result to 3 and then return 0... Not sure, you can look on MSDN for that. But this is the basic idea...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top