Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/09/2005, 19:51
LeandroA
 
Fecha de Ingreso: abril-2005
Mensajes: 351
Antigüedad: 19 años, 9 meses
Puntos: 3
La funciòn Api se encarga de presionar las teclas PrintScreen y Alt

En este ejemplo tiene un timer pero ponlo en el evento que te plazca


Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Const KEYEVENTF_KEYUP = 2

Dim cont As Integer

Private Sub Timer1_Timer()
Dim imagen As IPictureDisp
Static cont
keybd_event 18, 0, 0, 0
keybd_event 44, 0, 0, 0
keybd_event 44, 0, KEYEVENTF_KEYUP, 0
keybd_event 18, 0, KEYEVENTF_KEYUP, 0
Set imagen = Clipboard.GetData
Picture1 = imagen
End Sub