hi, im attempting to get an applications Icon by using the method
Icon.FromHandle () and passing in a windows handle, yet nothing works ive
tried two different things and neither work. Ive been googleing this to no
avail....code:
Protected Overrides Sub WndProc(ByRef m As Message)
MyBase.WndProc( m)
If m.Msg = WM_SYSCOMMAND Then
Select Case m.WParam.ToInt3 2
Case 1000
Dim tray As New NotifyIcon(Me.c omponents)
tray.Icon = Icon.FromHandle (m.HWnd)
''tried using Me.Handle to see if that would work but no
'tray.Icon = Icon.FromHandle (Me.Handle)
tray.Visible = True
AddHandler tray.DoubleClic k, AddressOf
NotifyIcon1_Dou bleClick
SendMessage(m.H Wnd.ToInt32, 0, Nothing, Nothing)
End Select
End If
End Sub
i set a breakpoint and step through, the method returns something, but
apparently not an Icon like the MSDN documentation says...any idea how i can
get this working? thanks
--
-iwdu15
Icon.FromHandle () and passing in a windows handle, yet nothing works ive
tried two different things and neither work. Ive been googleing this to no
avail....code:
Protected Overrides Sub WndProc(ByRef m As Message)
MyBase.WndProc( m)
If m.Msg = WM_SYSCOMMAND Then
Select Case m.WParam.ToInt3 2
Case 1000
Dim tray As New NotifyIcon(Me.c omponents)
tray.Icon = Icon.FromHandle (m.HWnd)
''tried using Me.Handle to see if that would work but no
'tray.Icon = Icon.FromHandle (Me.Handle)
tray.Visible = True
AddHandler tray.DoubleClic k, AddressOf
NotifyIcon1_Dou bleClick
SendMessage(m.H Wnd.ToInt32, 0, Nothing, Nothing)
End Select
End If
End Sub
i set a breakpoint and step through, the method returns something, but
apparently not an Icon like the MSDN documentation says...any idea how i can
get this working? thanks
--
-iwdu15
Comment