Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX dll . Cant Show Non Modal Form .... issue

Status
Not open for further replies.

aycan

Programmer
Aug 8, 2003
1
TR
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
 
Does it have to be a modal form? Can you load the form normally? This would enable you to 'pop-up' your other window (tool-tip) over top.

Just a thought, if your stuck i can look @ the code...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top