Timo,
* Timo Kunze <TK*********@gmx.de> scripsit:
Okay, my ToolTip class is working now. However, there seems to be a
hook eating all messages that the ListBox portion would normally
receive. Neither the ListBox nor the ComboBox receive WM_MOUSEMOVE or
any other mouse message.
I am able to receive the 'WM_MOUSEMOVE' message for the listbox part
using this code (no cleanup code included yet):
\\\
Imports System.Runtime.InteropServices
Public Class ExtendedComboBox
Inherits System.Windows.Forms.ComboBox
Private Const WM_CTLCOLORLISTBOX As Int32 = &H134
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If m.Msg = WM_CTLCOLORLISTBOX Then
Dim n As New Foo()
n.AssignHandle(m.LParam)
End If
MyBase.WndProc(m)
End Sub
End Class
Public Class Foo
Inherits System.Windows.Forms.NativeWindow
Private Const WM_MOUSEMOVE As Int32 = &H200
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If m.Msg = WM_MOUSEMOVE Then
Debug.WriteLine("Foo the bar")
End If
MyBase.WndProc(m)
End Sub
End Class
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>