Hello
Im trying to create a custom tooltip window. Its an activex dll. If i try to display my tip window over a modal form VB6 raises (Error 401 Cant Show Non Modal Form ) If i show my window using this sub there is no problem. It display over the modal form.
Sub ShowWindowOnTop(hwnd As Long)
Dim nWidth As Integer
Dim nHeight As Integer
Dim rectWindow As RECT
GetWindowRect hwnd, rectWindow
nWidth = rectWindow.Right - rectWindow.Left
nHeight = rectWindow.Bottom - rectWindow.Top
Call SetWindowPos(hwnd, HWND_TOPMOST, rectWindow.Left, rectWindow.Top, nWidth, nHeight, SWP_NOACTIVATE)
ShowWindow hwnd, SW_SHOWNORMAL
End Sub
But this time the command buttons and textboxes on my tip window doesnt work. The modal form constantly takes the focus.And i cannot click on my controls.
If i compile my dll and call my tip window from a test project(Referenced to my dll) it works perfect if my test project isnt compiled. But if compile it too the problem is back again.
The test project and dll both in IDE the problem occurs
If dll is compiled but test project isnt there is no prob
If they are both compiled the problem remains.
Can anybody help me with that. Its really urgent i can send the project if anybody wants to look at the code
Thanks
Im trying to create a custom tooltip window. Its an activex dll. If i try to display my tip window over a modal form VB6 raises (Error 401 Cant Show Non Modal Form ) If i show my window using this sub there is no problem. It display over the modal form.
Sub ShowWindowOnTop(hwnd As Long)
Dim nWidth As Integer
Dim nHeight As Integer
Dim rectWindow As RECT
GetWindowRect hwnd, rectWindow
nWidth = rectWindow.Right - rectWindow.Left
nHeight = rectWindow.Bottom - rectWindow.Top
Call SetWindowPos(hwnd, HWND_TOPMOST, rectWindow.Left, rectWindow.Top, nWidth, nHeight, SWP_NOACTIVATE)
ShowWindow hwnd, SW_SHOWNORMAL
End Sub
But this time the command buttons and textboxes on my tip window doesnt work. The modal form constantly takes the focus.And i cannot click on my controls.
If i compile my dll and call my tip window from a test project(Referenced to my dll) it works perfect if my test project isnt compiled. But if compile it too the problem is back again.
The test project and dll both in IDE the problem occurs
If dll is compiled but test project isnt there is no prob
If they are both compiled the problem remains.
Can anybody help me with that. Its really urgent i can send the project if anybody wants to look at the code
Thanks