Hello, I use vb.net 2005 to create a Form. Suppose the class name is Form1.vb.
And I try to find the handle of the Form in the code Form1.vb.
The string for the class name "WindowsForms10.Window.8.app.0.3ce0bb8" was gotten from the tool WinSpy++. Because I don't know what is the proper name for pWindowName, so I used vbNullString.
But an exception was thrown.
Can somebody guide me a right direction?
Many thanks.
And I try to find the handle of the Form in the code Form1.vb.
Code:
Private Declare Function FindWindow Lib "User32" Alias "FindWindow" (ByVal pClassName as String, ByVal pWindowName as String) as Long
' ------- many code
Dim retval As Long
retval = FindWindow("WindowsForms10.Window.8.app.0.3ce0bb8",vbNullString)
But an exception was thrown.
Code:
{"Unable to find an entry point named 'FindWindow' in DLL 'User32'.":""}
Can somebody guide me a right direction?
Many thanks.