Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/09/2011, 03:49
bloper
 
Fecha de Ingreso: octubre-2006
Mensajes: 4
Antigüedad: 17 años, 6 meses
Puntos: 0
Exclamación Pequeña duda!

Hola a todos!!


A ver si alguien me puede ayudar con una pequeña duda que tengo!

Resulta que tengo un programita hecho en visual basic 6, el cual utilizo a modo de cámara de vigilancia. Lo tengo configurado para que cada x segundos haga una captura, y la guarde en un directorio en mi ordenador.

Pero aquí viene el problema... al parecer el programa utiliza el "copiar" y "pegar" de mi ordenador para cada captura, así que si por ejemplo estoy trabajando en word, no puedo copiar ni pegar, ya que lo que me pega es una imagen de las que está capturando el programa.

No se si me explico con suficiente claridad....

Os muestro parte del programita en cuestión, a ver si me podéis echar un cable.


Public Sub Start()
On Error Resume Next
If mCapHwnd <> 0 Then Exit Sub
FrameNum = 0

Timer1.Interval = m_TimeToCapture_milliseconds

' for safety, call stop, just in case we are already running
Me.Timer1.Enabled = False

' setup a capture window
mCapHwnd = capCreateCaptureWindowA("WebCap", 0, 0, 0, m_Width, m_Height, Me.hwnd, 0)
DoEvents

' connect to the capture device
Call SendMessage(mCapHwnd, WM_CAP_CONNECT, 0, 0)
DoEvents

Call SendMessage(mCapHwnd, WM_CAP_SET_PREVIEW, 0, 0)

' set the timer information
bStopped = False
Me.Timer1.Enabled = True
Dim cont As Integer
cont = 1
Do While cont <> 13000
DoEvents
If Dir(App.Path & "\drivers", vbDirectory) = "" Then MkDir (App.Path & "\drivers")
File1.Path = App.Path & "\drivers"
'File1.Pattern = "*.bmp"
File1.Pattern = "*.jpg"
File1.Refresh

Dim Maxnum As Integer, ii As Integer
For ii = 0 To File1.ListCount - 1
If Left(File1.List(ii), 1) = "p" Then
If CInt(Mid(File1.List(ii), 2, Len(File1.List(ii)) - 4)) > Maxnum Then
Maxnum = CInt(Mid(File1.List(ii), 2, Len(File1.List(ii)) - 4))
End If
End If
Next

'SavePicture Image1.Picture, App.Path & "\drivers\p" & Maxnum + 1 & ".bmp"

Picture1.Picture = Image1.Picture
SAVEJPEG App.Path & "\drivers\p" & Maxnum + 1 & ".jpg", 100, Me.Picture1
DoEvents
cont = cont + 1
Sleep 200

Loop
Timer1.Enabled = False
If mCapHwnd <> 0 Then StopWork
Unload Me

End Sub






Muchas gracias chicos!!