|
-
Dec 17th, 2017, 08:02 AM
#18
Re: How to change state of window to modal ? (in another program)
 Originally Posted by Eduardo-
What I said stays: modal means something, and owned means something else, they are not the same thing.
I think you need to specify what you mean exactly by "modal". Is it UI-modal, code-modal, both or something else? In VB6, modal Forms are both UI- and code-modal.
 Originally Posted by Eduardo-
If what you are trying to say is that modal windows can be also owned, yes of course.
If what you are trying to say is that modal windows are always owned, may be, I don't know.
By convention, modal windows are always owned. Sure, you could mimic a modal window's behavior using an unowned top-level window, but why would you go to such lengths when there's a much easier way?
 Originally Posted by Eduardo-
But it isn't important for the question of this thread anyway.
One possible solution to Dragokas' problem was given in the thread I've linked to in post #12 - SetWindowLong(hWnd, GWL_HWNDPARENT, hWndNewOwner). In addition to that, he will also need to take care of a few things.
BTW, in the course of writing the test project above, I've discovered that VB6 apparently uses the GWL_HWNDPARENT hack itself when setting the owner Form via the Show method.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|