- ©«¤l
- 472
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 485
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- MS Office
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »´ä
- µù¥U®É¶¡
- 2010-7-4
- ³Ì«áµn¿ý
- 2014-12-28
|
SUB TEST¥H¤Wªº¬OAPI©w¸q,¥Î¨Ó©I¥sWINDOW¨t²Îªº"¤pµ{§Ç"
³o¸Ì¦³3Ó"¤pµ{§Ç":FindWindow,SetCursorPos,GetWindowRect
Private Sub test()
Dim Rec As RECT ³o¥y§A¥i¥H·í¬O¦s§¤¼ÐªºÅܶqREC
GetWindowRect GetWindowHandle, Rec §âEXCELªº§¤¼Ð©ñ¨ìREC
SetCursorPos Rec.Right - 600, Rec.Top + 400 §â¦Ñ¹«©ñ¨ìEXCEL¥k¤W¨¤¦V¥ª600ÂI¦ì©M¤W¤è¹ï¤U400ÂI¦ì
End Sub
GetWindowHandle:
XLMAIN¬OEXCELªº"¨t²Î¦WºÙ" FINDWINDOW ¥Î¨Ó§ä¥XEXCELªº"ID: (§YHANDLE)
¥Î¨Ó§@¤é«á«ü©wª©±°µ¾Þ§@,¦pTEST¤UªºSETCURSORPOS
GetWindowHandle¥i¼g¦¨
Private Function GetWindowHandle() As Long
GetWindowHandle = FindWindow("XLMAIN", vbNullString)
End Function |
|