SA-MP Forums Archive
[Pregunta Off-Topic] Posicion del cursor en Visual Basic 6.0 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Pregunta Off-Topic] Posicion del cursor en Visual Basic 6.0 (/showthread.php?tid=150384)



[Pregunta Off-Topic] Posicion del cursor en Visual Basic 6.0 - MrDeath537 - 26.05.2010

Bueno, mi pregunta es esa, hay alguna forma de obtener la posicion del cursor en Visual Basic 6.0?, cual?. Gracias desde ya


Re: [Pregunta Off-Topic] Posicion del cursor en Visual Basic 6.0 - TheChaoz - 26.05.2010

mira aca te enconte algo sobre eso en internet:
Код:
Option Explicit 
 
'  * Colocar un control Timer  
'-------------------------------------------------  
 
'Estructura de coordenadas para el api GetCursorPos  
Private Type POINTAPI  
  X As Long 
  Y As Long 
End Type 
 
 
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long 
 
Dim Mouse As POINTAPI  
 
Private Sub Form_Load()  
  'Ponemos el Timer en 100  
  Timer1.Interval = 100  
  Me.FontSize = 10  
End Sub 
 
Private Sub Timer1_Timer()  
 
  'Ejecutamos la funciуn y recuperamos la posicion del cursor  
  Call GetCursorPos(Mouse)  
 
  ' limpia el form  
  Me.Cls  
    
  Me.Print "Posicion del cursor :" 
  'Imprimimos las cordenadas X e Y devueltas por el api  
  Me.Print "X:" + Str$(Mouse.X) + vbCrLf + "Y:" + Str$(Mouse.Y)  
 
End Sub
fuente


Re: [Pregunta Off-Topic] Posicion del cursor en Visual Basic 6.0 - MrDeath537 - 26.05.2010

Gracias, me sirve, pueden cerra el post xD. (perdon por abrir un posteo solo para 3 comentarios :\)