To communicate with a certain service, I have to override the WindProc
. and receive window messages.
However, when the form is minimized, I get no longe
You can try NativeWindow
to receive messages (VB code, sorry):
Imports System.Windows.Forms
Public Class MyClass: Inherits NativeWindow
Private piFormHandle As Integer = 0
Sub New()
Me.CreateHandle(New CreateParams)
piFormHandle = CInt(Me.Handle)
End Sub
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Select Case (m.Msg)
Case MyMessage
End Select
MyBase.WndProc(m)
End Sub
End Class