Click to See Complete Forum and Search --> : Excel & NonModal Forms


Corneliu.Tusnea
February 11th, 2000, 08:30 PM
Hi,
I have the following problem:
I have some VB classes in an ActiveX DLL.
Those classes are instantiated from an Excel Macro.
From one class I want to display a Fram on the screen over the Excel.
If I make the fram with "vbModal" everything goes perfect.
If I want to make the window to be non modal, but to be always over Excel.
I can't get the Parent (should be Excel)to give it to the myForm.Show parent.
So, if I just use myForm.Show, the window get's displayed, but when I click somewhere in the Excel, the window disapears somewhere behind :(
I've tried to make a "SetWindowPos (myFrame.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)" call, and the window remains on top of Excel (for a while).
If I open explorer (or any other application), my window dissapears again, even behind Excel.
So, how can I make the window to always stay above Excel ?

Thanks,
Corneliu.

Corneliu I. Tusnea
Infopulse Romania