VB 中.如何实现找指定窗口的坐标
我用这个.只能读取当前窗体的而以.怎么样可以查找指定窗体的.
GetWindowRect Me.hwnd, sb
[解决办法]
- VB code
Option ExplicitPrivate Sub Command1_Click() t1End SubPrivate Sub t1() Dim hNotepad As Long, lRect As RECT hNotepad = FindWindow("Notepad", vbNullString) Call GetWindowRect(hNotepad, lRect) Debug.Print lRect.Left & " ," & lRect.Top & " ," & lRect.Right & " ," & lRect.bottom MsgBox hNotepadEnd Sub