Solved

Modal Dialog with Modeless 'Floating' Child Forms

Posted on 1998-11-24
7
377 Views
Last Modified: 2010-05-18
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.
0
Comment
Question by:danG
  • 3
  • 2
  • 2
7 Comments
 
LVL 4

Expert Comment

by:idcanada
ID: 1446637

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
0
 

Author Comment

by:danG
ID: 1446638
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.
0
 

Author Comment

by:danG
ID: 1446639
Adjusted points to 205
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 4

Expert Comment

by:idcanada
ID: 1446640

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.

0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1446641
Give them the toolbox window style. In vb, it's a border setting I think
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1446642
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 200 total points
ID: 1446643
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now