Link to home
Start Free TrialLog in
Avatar of danG
danG

asked on

Modal Dialog with Modeless 'Floating' Child Forms

I have to create a modal application form.  I would like this modal form to have 'floating' toolpads, each having titlebars that are the same color as the active modal main application form.  I know how to reparent these forms so that they stay on top of main app, and are minimized/destroyed when the main app is minimized destroyed.

How do I allow input to be received from these modeless toolpads without changing the modal nature of the main application window (this is important as this main applcation is part of an Active X DLL, which has to halt execution of any client applications that call it).

Finally, how do I set the grey titlebar colors of the modeless forms to match that of the modal main app form?

I think the answers to these questions relate to windows API calls, which I know very little about.  Code examples are greatly appreciated.

Thanks very much.
Avatar of idcanada
idcanada


Hi,
I had a simular problem and resolved it by setting the focus to the form on every
loss of focus event inside the form.

So, on the form.deactivate and lostfocus I give the form focus.
Me.SetFocus.

You could also use a timer for this...
but I prefer the other way.

Good Luck
Avatar of danG

ASKER

Thanks for your answer, I can see its usefulness, but I would like to open the question up for the possibility of receiving an API related solution.
Avatar of danG

ASKER

Adjusted points to 205

People never want the fastest answer,
just the more complicated it looks... the better it is.

You could use the SetFocus API call, however,
Place a timer and test which preforms better. (Speed)

The simple setfocus of VB does the job better.

Give them the toolbox window style. In vb, it's a border setting I think
ASKER CERTIFIED SOLUTION
Avatar of Mirkwood
Mirkwood

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial