S
Season
Hi, I am facing problem with calling FindWindow at my coding:-
Imports System.Runtime.InteropServices ' For DllImport
Public Class Form1
<DllImport("CoreDll.dll")> _
Private Shared Function FindWindow(ByVal lpClassName As String, ByVal
lpWindowName As String) As Long
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim llngHWnd As Long
llngHWnd = FindWindow("TestWinAPI2", vbNullString)
MsgBox(llngHWnd)
End Sub
End Class
Visual Studio 2005 prompted me with error at row of "llngHWnd =
FindWindow("TestWinAPI2", vbNullString)". Error displayed =
NotSupportedException. Please help. Thanks in advance.
Imports System.Runtime.InteropServices ' For DllImport
Public Class Form1
<DllImport("CoreDll.dll")> _
Private Shared Function FindWindow(ByVal lpClassName As String, ByVal
lpWindowName As String) As Long
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim llngHWnd As Long
llngHWnd = FindWindow("TestWinAPI2", vbNullString)
MsgBox(llngHWnd)
End Sub
End Class
Visual Studio 2005 prompted me with error at row of "llngHWnd =
FindWindow("TestWinAPI2", vbNullString)". Error displayed =
NotSupportedException. Please help. Thanks in advance.