help save videos as avi

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts Page 1 of 1
Contributors
User avatar
alc955
New Member
New Member
Posts: 13
Joined: Sun Jul 04, 2010 4:46 pm

help save videos as avi
alc955
Code: Select all
Imports System.IO

Public Class Form1
Dim Screen As New Bitmap(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
Dim Screensize As New Size(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
Dim G As Graphics = Graphics.FromImage(Screen)
Dim Stream As New FileStream("C:\videofile.avi", FileMode.Append)



Private Sub TmrCapture_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TmrCapture.Tick

G.CopyFromScreen(New Point, New Point, Screensize)
Screen.Save(Stream, Imaging.ImageFormat.Bmp)
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim ff As New FolderBrowserDialog
If (ff.ShowDialog = DialogResult.OK) Then
TextBox1.Text = ff.SelectedPath + "\"
End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TmrCapture.Start()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TmrCapture.Stop()
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
AxWindowsMediaPlayer1.URL = "c:\test.avi"
End Sub
End Class
i found this codes but didnt work :S
what is the problem S:
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: help save videos as avi
mandai
AVI files need more than just bitmap data.

See http://www.alexander-noe.com/video/docu ... on/avi.pdf
User avatar
alc955
New Member
New Member
Posts: 13
Joined: Sun Jul 04, 2010 4:46 pm

Re: help save videos as avi
alc955
this pdf file's code isnt for VB it is for C#
i am trying make it in VB
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: help save videos as avi
mandai
In fact with types like DWORD it looks more closely related to C++, though you should be able to translate it and use the equivilent types.
4 posts Page 1 of 1
Return to “Tutorial Requests”