Public Class Form1 Public cap As Capture Public f As Filters Public Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load f = New Filters cap = New Capture(f.VideoInputDevices(0), f.AudioInputDevices(0)) cap.FrameRate = 29.997 cap.FrameSize = New Size(640, 480) cap.AudioSamplingRate = 44100 cap.AudioSampleSize = 16 'cap.AudioChannels = 1 cap.PreviewWindow = PictureBox1 End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Timer1.Start() cap.Filename = "test.mp4" cap.Cue() cap.Start() End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click cap.Stop() 'cap.Dispose() End Sub Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click 'Process.Start("start.avi") Form2.AxWindowsMediaPlayer1.URL = "test.mp4" Form2.ShowDialog() End Sub Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click Application.Exit() End Sub End Class
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)