Hai!
Ich habe es mit folgendem Code hinbekommen:
Es ist ein Click-Ereignis auf einen Button, ein Bild mit Uhrzeit und Datum wird im aktuellem Verzeichnis abgelegt.
---------------------------------------------------------------
Code:
'Bild als BMP auf Platte speichern
Private Sub Capture1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Capture1.Click
CapturePicture(Video_Handle, Picture1)
Dim x As String
Dim z As String
Dim y As Integer
x = Date.Now
z = ""
For y = 1 To Len(x)
If Mid(x, y, 1) = ":" Or Mid(x, y, 1) = " " Or Mid(x, y, 1) = "." Then
z = z + ""
Else
z = z + Mid(x, y, 1)
End If
Next y
z = z + ".bmp"
Filename.Text = z
Picture1.Image.Save(z)
End Sub
und hier die Subroutine dazu:
Code:
'Bild Capturen
Public Sub CapturePicture(ByRef nCaptureHandle As Integer, ByRef picCapture As System.Windows.Forms.PictureBox)
My.Computer.Clipboard.Clear()
SendMessage(nCaptureHandle, WM_CAP_EDIT_COPY, 0, 0)
picCapture.Image = My.Computer.Clipboard.GetImage()
End Sub
Vielleicht hilft es dir...
Tschau
Lesezeichen