ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] vba¥i§_¨Ï¥Î®y¼Ð¨Ï·Æ¹««ö¤U¥ªÁä©Î¥kÁä

[µo°Ý] vba¥i§_¨Ï¥Î®y¼Ð¨Ï·Æ¹««ö¤U¥ªÁä©Î¥kÁä

vba¥i§_¨Ï¥Î®y¼Ð¨Ï·Æ¹««ö¤U¥ªÁä©Î¥kÁä
§ä¤F·s½×ôΩM½×ôΡA¦n¹³¨S¤°»ò¤H°Q½×³o­Ó°ÝÃD¡C
¦]¬°¤½¥q¥u¯à¥Îexecl¡A©Ò¥H¤~·|·Q»¡¥Îvba¼g¤U¥\¯à

§ä¤F ¤@¨Ç¤å¡A¦ý¯uªº§ä¤£¨ì¡A¤S¬Ý¤£À´¡C
¤£ª¾¦³¤j¤jÄ@·N±Ð¾É¶Ü?
·PÁ¤§^^

¦^´_ 9# Min
·PÁª©¥D¤j¤j,¤p§Ì¤w¸g¦b§Oªº°Q½×ª©¤W­±¦³¬Ý¨ìµª®×,¨Ã±N¥H¤À¨É
¦ý¤´¦³¹J¨ì°ÝÃD
ÁöµM¤U¤èµ{¦¡½X¥i¥H§ä¥X¿Ã¹õªº¤Ø¤o,¦ý§Úµo²{¤@¯ëªººô¯¸¤]·|®Ú¾Ú¤Ø¤oªº¤j¤p§@½Õ¾ã,¥i¬O¤£¬Oµ¥¤ñ¨Òªº½Õ¾ã
¾É­P¤U¤èªºµ{¦¡½XÁöµM¥i¥H¦Û¦æ½Õ¾ã¤ñ¨Ò,¥i¬O¤´µMÂI¤£¨ì­ì¥»¸ÓÂIªº¦ì¸m
  1. Public Declare Function GetSystemMetrics Lib "user32.dll" (ByVal index As Long) As Long
  2. Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
  3. Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
  4. Public Const XX = 1920
  5. Public Const YY = 1080
  6. Public Const SM_CXSCREEN = 0
  7. Public Const SM_CYSCREEN = 1
  8. Sub TEST()
  9. x = [A1]: y = [A2]
  10. xaxis = GetSystemMetrics(SM_CXSCREEN) / XX
  11. yaxis = GetSystemMetrics(SM_CYSCREEN) / YY
  12. SetCursorPos x * xaxis, y * yaxis '«ü©w·Æ¹«®y¼Ð
  13. 'mouse_event &H2 Or &H4, 0, 0, 0, 0 '¥ªÁäÂIÀ»
  14. 'mouse_event &H2 Or &H4, 0, 0, 0, 0 '¥ªÁäÂIÀ»

  15. End Sub
½Æ»s¥N½X
PKKO

TOP

¦^´_ 9# Min


    ·PÁª©¥D¤j¤j,¦n±jªº¥\¯à,¦n²³æªºµ{¦¡½X,¹ê¦b¤Ó¼F®`¤F!!!
¤£¹L¥Ø«e¸I¨ì¤@­Ó°ÝÃD
·Q¸ß°Ý¤@¤Uª©¥D¤j¤j

¦]¬°¤£¦P¿Ã¹õªº¸ÑªR«×¤£¦P,¾É­PµLªkÂIÀ»¨ì¬Û¦Pªº¦ì¸m
·Q¸ß°Ý¤@¤U¦³¸Ñ¨M¤èªk¶Ü?

¨Ò¦p:¦p¦ó¨ú±o¿Ã¹õªºX,Yªº³Ì¤j­È?
©Î¬O¦p¦ó¨ú±o¿Ã¹õªº¤ñ¨Ò¤§Ãþªº?

©êºp³Â·Ðª©¥D¤j¤j¤F!
PKKO

TOP

¥»©«³Ì«á¥Ñ Min ©ó 2010-8-9 21:01 ½s¿è

¨þ¨þ¨þ~ Åý±z"¥Ø·Ù·Ù"¯u¤£¦n·N«ä!
¯à¤O¤£¤Î¨ä¥L«e½ú ©Ò¥H¦p¦³¤£§´¤§³B ¤]½Ð±z¦h¦h«ü±Ð^^"

¥H¤U¬OAPI¼ÒÀÀ·Æ¹«¨Æ¥ó ±z¸Õ¸Õ¬Ý!


Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)

SetCursorPos 100, 50'«ü©w·Æ¹«®y¼Ð
mouse_event &H2 Or &H4, 0, 0, 0, 0 '¥ªÁäÂIÀ»
­Y¬O§Ú¦^µª¡A¨Ï±zº¡·N¡A½Ð±zÅý§Úª¾¹D¡I                  
­Y¬O§Úªº¦^ÂСA±z¤´¦³¨ä¥L¨£¸Ñ¡A¤]½Ð±z¤£¶Þ«ü±Ð¡I

TOP

¦^´_  ¥®¸X¶é­¸¤Ñ½Þ


   [/url]
EXCEL°ò¥»¤W°Q½×ªº¸òAPI¦³Ãöªº¤ñ¸û¤Ö¦³¿³½ì¥h¾Ç¾ÇVB©ÎCµ¥¸û§C¶¥»y¨¥
Hsieh µoªí©ó 2010-8-7 19:16



    ·PÁÂHsieh ¤j´£¨Ñªº¸ê·½¡A²×©ó§ä¨ì¤è¦V¤F¡AÁÂÁÂ^^

TOP

¦^´_ 6# ¥®¸X¶é­¸¤Ñ½Þ


    [url]http://chijanzen.net/wp/?p=51[/url]
EXCEL°ò¥»¤W°Q½×ªº¸òAPI¦³Ãöªº¤ñ¸û¤Ö¦³¿³½ì¥h¾Ç¾ÇVB©ÎCµ¥¸û§C¶¥»y¨¥
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦n¹³¨S¤H¬ã¨s³o¶ô@@

TOP

GBKEE ¤]¬O«Ü§Q®`ªº°ª¤â©O^^¥­±`§A¦^µª°ÝÃD³£¦n§Ö¦Ó¥B³£«Ü²Å¦X»Ý¨D¤]Åý§Ú¾Ç¤F¤£¤Ö
ÁöµM¤£±`µo¤å¡A¦ý§Ú±q¬ݨì·sªº½×ôΡA¾Ç¨ì¤£¤Ö^^

©Î³\³o¶ôªF¦è¤ñ¸û¤Ö¤H¬ã¨s¡A¤j¦hªº¤H³£ª½±µ¥Îvb6¼g¤F
¥u¬O¦]¬°¤½¥q¥u¯à¨Ï¥Îexecl¡A©Ò¥H¥u¦n¥Îvba¨Ó¼g°õ¦æ¥Øªº¤F¡C

§Ú¦³¬Ý¹L¶{¤j¦³µo¹L¡A¥u¬O¥Lµoªº§Ú¬Ýªº¬O¥Ø·Ù·Ù@@

TOP

¦^´_ 3# ¥®¸X¶é­¸¤Ñ½Þ
¬Ý¤F§Aªº»¡©ú ¬O»Ý°ª¤â¨Ó¸Ñµª

TOP

¥»©«³Ì«á¥Ñ ¥®¸X¶é­¸¤Ñ½Þ ©ó 2010-8-6 12:14 ½s¿è

§Ú¥Îvba©M§Ú¤½¥qªº¨t²Îµ²¦X(ºÙti)
¤@ºØ¬O¡G°²³]§Ú¬O1024*768¡A¨º§Ú§Æ±æ¦bÀç¥Ø¤Wªº®y¼Ð200*200ªº¦a¤è«ö¤U¥ªÁä·Æ¹«¡A¦ý¬O«ö ªº¬Oti¤W­±ªº«öÁä¡A§Ú¤w°µ¦n«ü¦Vti°õ¦æÁä½Lªº°Ê§@¤F¡A¦ý¬OµLªk°õ¦æ«ü¦Vti°õ¦æ·Æ¹«ªº°Ê§@¡C¤£¤@©w­n¥Hti¬°«ü¦V¡C©Î³\¦b¾ã­Ówin¤W­±¡A´N¬O1024*768ªº¸ÑªR¤º¡A¥hÂI§Ú·Q­nªº®y¼Ð«ö¤U·Æ¹«¥ªÁä¡A¦ý¤£¬OÂI¦bexecl¤W­±¡C¬OÂI¨ì§Ú­nªº®y¼Ð¤W¡A¦ýÂIªº¬O§OªºªF¦è©ÎªÌ§Oªº°õ¦æµ{¦¡

¤£ª¾§Ú³o¼Ë»¡¬O¤£¬O«Ü©â¶H

¸É¤W¹Ï¤ù»¡©úÀ³¸Ó¤ñ¸û²M·¡¡A^^¡A¹Ï¬°¥Î¤pºâ½L¬°¨Ò, ¸Ì­±»¡©úªº´N¬O·Q¨Ì®y¼Ð¥h°õ¦æ·Æ¹«¥ªÁä©Î¥kÁ䪺°Ê§@¡A¤£½×¬O¥H¥þÀç¹õÁÙ¬O¥Hµ{ºâªº®y¼Ð³£ok

vbam.JPG (141.56 KB)

vbam.JPG

TOP

        ÀR«ä¦Û¦b : «H¤ß¡B¼Ý¤O¡B«i®ð¤TªÌ¨ã³Æ¡A«h¤Ñ¤U¨S¦³°µ¤£¦¨ªº¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD