Les dejo el código y la línea donde me tira error en negrita
Citar
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const FLAGS As Long = SWP_NOMOVE Or SWP_NOSIZE
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Private Declare Function SetWindowPos Lib "user32" ( _
ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
ByVal X As Long, ByVal Y As Long, ByVal cx As Long, _
ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Dim nombre As String
Private Sub capturar_Click()
'capturar pantalla y guardarla
keybd_event 44, 0, 0&, 0&
If nombre.Text = "" Then
Dim respuesta As String
respuesta = MsgBox("Ingrese nombre", vbOKOnly, "Nombre")
Else
SavePicture Clipboard.GetData, (Path & nombre.Text& ".bmp")
End If
End Sub
Private Sub cerrar_Click()
End
End Sub
Private Sub Form_Load()
Clipboard.Clear
Me.WindowState = 0
SetWindowPos Me.hwnd, _
HWND_TOPMOST, 0, 0, 0, 0, FLAGS
End Sub
Const SWP_NOMOVE = &H2
Const FLAGS As Long = SWP_NOMOVE Or SWP_NOSIZE
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Private Declare Function SetWindowPos Lib "user32" ( _
ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
ByVal X As Long, ByVal Y As Long, ByVal cx As Long, _
ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Dim nombre As String
Private Sub capturar_Click()
'capturar pantalla y guardarla
keybd_event 44, 0, 0&, 0&
If nombre.Text = "" Then
Dim respuesta As String
respuesta = MsgBox("Ingrese nombre", vbOKOnly, "Nombre")
Else
SavePicture Clipboard.GetData, (Path & nombre.Text& ".bmp")
End If
End Sub
Private Sub cerrar_Click()
End
End Sub
Private Sub Form_Load()
Clipboard.Clear
Me.WindowState = 0
SetWindowPos Me.hwnd, _
HWND_TOPMOST, 0, 0, 0, 0, FLAGS
End Sub
Logro que me guarde una imagen y luego me da error de compilación, a ver si alguien me puede decir porque! Soy nuevito con visual