读书人

VB 中.怎么实现找指定窗口的坐标

发布时间: 2012-03-09 21:42:54 作者: rapoo

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 

读书人网 >VB

热点推荐