Crouchie,
"Crouchie1998" <Cr**********@discussions.microsoft.com> schrieb:
Just extending what Mr MVP said:
:-)
I would be glad if you don't always call me "Mr MVP" :-). My name is
Herfried...
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA"
(ByVal
lpClassName As String, ByVal lpWindowName As String) As Integer
' Find Window passing the class name only
Dim intHandle As Integer = FindWindow("[Class Name Here]",
vbNullString)
Although your code works, I'd use 'IntPtr' for the handle returned by
'FindWindow' instead of 'Integer'.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>