Well i want to make a screen recorder that takes a screenshot evrey so often and saves them all to an AVI and i made this, but wen i try and open the AVI its not recognized:
OK please helpCode: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:\TestVideo.avi", FileMode.Append) Private Sub BtnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnStart.Click TmrCapture.Start() End Sub Private Sub BtnStop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnStop.Click TmrCapture.Stop() End Sub 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 End Class![]()




Reply With Quote
