[VB.Net] Record Screen

Posts 1–14 of 14 · Page 1 of 1
[VB.Net] Record Screen
Hi,
I've got a little bit boring today and decided to make something different.
I want to make a program that can record a game. I already found out how to make simple screenshots, but I want to save them as a video file with sound.

Sounds a little bit impossible, maybe someone can help.
Thanks
for the video component, you will be constantly nabbing the screen (screenshotting).

for the audio component, you will need to hook / get the sound device output stream and save it with your video.
I think there is some helpful stuff in the snippets vault
Status:
Audio = No problem but in connection with the video it might get difficult.
Video = Still dont know how to save the pictures to a vid file

Thanks for all the help
I tried and i got it going but its really wierd?
More detail. How is it weird? What is the expected outcome, and what is the actual outcome?
lol @ tremasters
Do you know what we're talking about? o0
Quote Originally Posted by jabbathehutt View Post
lol @ tremasters
Do you know what we're talking about? o0
Unfortunately, Yes !!!
use the wmv sdk, i made a screen recorder with it. it can encode both audio and video
Hi there
I started to make one without the SDK.
Please can somone have a look:
Code:
Public Class Form1

    Private Sub RECScreen_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RECScreen.Tick
        'The PlayBack Part of the program.
        If CheckBox1.Checked = True Then
            Dim DirectoryA As String = FileDIR.Text
            Dim Frame0 As String = FileNUM.Text
            Dim img0 As String = FileType.Text

            FileNUM.Text = FileNUM.Text + 1
            VideoScreenWindow.VideoScreen.Load(DirectoryA & Frame0 & img0)

        Else
            'The Recording Part Of the program.
            Dim ScreenSize As Size = New Size(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
            Dim BMP As New Bitmap(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
            Dim g As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(BMP)
            g.CopyFromScreen(New Point(0, 0), New Point(0, 0), ScreenSize)

            Dim DirectoryA As String = FileDIR.Text
            Dim Frame1 As String = FileNUM.Text
            Dim img1 As String = FileType.Text

            FileNUM.Text = FileNUM.Text + 1
            BMP.Save(DirectoryA & Frame1 & img1)

        End If
    End Sub



    'Frame Rate, Playback Control & Recording Control
    Private Sub INT10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles INT10.Click
        Label1.Text = "100 FPS"
        RECScreen.Interval = "10"
    End Sub

    Private Sub INT50_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles INT50.Click
        Label1.Text = "20 FPS"
        RECScreen.Interval = "50"
    End Sub

    Private Sub INT100_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles INT100.Click
        Label1.Text = "10 FPS"
        RECScreen.Interval = "100"
    End Sub

    Private Sub INT250_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles INT250.Click
        Label1.Text = "04 FPS"
        RECScreen.Interval = "250"
    End Sub

    Private Sub INT500_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles INT500.Click
        Label1.Text = "02 FPS"
        RECScreen.Interval = "500"
    End Sub

    Private Sub INT1000_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles INT1000.Click
        Label1.Text = "01 FPS"
        RECScreen.Interval = "1000"
    End Sub

    'Stop or Rec/Play Recording(s)
    Private Sub REC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles REC.Click
        RECScreen.Enabled = True
        FileNUM.Text = "0"
    End Sub

    Private Sub STP_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles STP.Click
        RECScreen.Enabled = False
    End Sub

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

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        VideoScreenWindow.Hide()
    End Sub
End Class

I keep getting an error in this line:
Code:
BMP.Save(DirectoryA & Frame1 & img1)
can someone help please?
Strings <> Integer.
what is wrong o0?

EDIT: I found the prob:
I forgot the \ after my directory.
so then finished?
/request solved?
Quote Originally Posted by o0OpurezO0o View Post
so then finished?
/request solved?
Only OP can request solved.
Posts 1–14 of 14 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?