Declare Function FindWindow& Lib "user32.dll" Alias "FindWindowA" (ByVal lpszClass&, ByVal lpszWindow&)
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDest As Any, pSource As Any, ByVal ByteLen As Long)
Sub main()
Dim Hwnd&
CopyMemory Hwnd, "无标题 - 画图", 4
Hwnd = FindWindow(0, Hwnd)
MsgBox Hwnd
End Sub
也可以