I am facing problem on a VB6 dll project.
What I have done:
I have made an application-1 which is a VB6 exe application. It adds a
floating toolbar (with one button on it) into powerpoint.
Then I have made a form in my application-2, which is a VB6 dll
application, and I am calling that form on the button click in the PowerPoint.
i.e. Floating Toolbar in PowerPoint -> On Click -> Calls form from VB6 dll
project.
Now, initially when I called the form it was appearing behind PowerPoint's
main window. Then I wrote this:
SetWindowPos hWnd, HWND_TOPMOST, 0, 0, 1, 1, SWP_NOSIZE Or SWP_NOMOVE
on formload event. But, this gave me another problem. Now the form will
remain on top of every application that I open i.e. If my PPT is open and
then I open a word file the form will remain on top of word file too.
Then I tried:
SetWindowPos hWnd, HWND_TOP, 0, 0, 1, 1, SWP_NOSIZE Or SWP_NOMOVE
but then if I click PowerPoint then my form will go behind PowerPoint.
What I want:
The form should remain on top of PowerPoint window only. If I open another
application then the form should not be on top of that application. Also, I
want that till the time my form is open I should not be able to operate the
PowerPoint window, else if I click PowerPoint window the form will go behind
PowerPoint.
Just for example: I want to my form to show behaviour as shown by the "Save
PPT" window. If its open you should not be able to click on PowerPoint and my
form should be on top of Powerpoint only.
Please help me, this is very urgent.
Thanks in advance.