Page 1 of 1

How To Make A Screen Recorder

Posted: Fri Jul 02, 2010 4:52 pm
by Toby64800
Form1
Names:
10 Buttons
1 timmer Named: RECScreen
Button1 = Start
Button2 = Stop
Button3 = 10
Button4 = 50
Button5 = 100
Button6 = 250
Button7 = 500
Button8 = 1000
Button9 = Video Preview On
Button10 = Video Preview Off
Properys:
Button1Name: REC
Button2Name: STP
Button3Name: INT10
Button4Name: INT50
Button5Name: INT100
Button6Name: INT250
Button7Name: INT500
Button8Name: INT1000
Button9Name: Button9
Button10Name: Button10
Form2Name: VideoScreenWindow
1 Picturebox
PictureboxName: VideoScreen
------------------------------------------
Just Delete The Main Form1 Code And Past This Code
Code For Form1:

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 Frame1 As String = FileNum.Text
Dim img1 As String = FileType.Text

FileNUM.Text = FileNUM.Text + 1
VideoScreenWindow.VideoScreen.Load(DirectoryA & Frame1 & img1)

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

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

Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
VideoScreenWindow.Hide()
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 Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub
End Class

Form2 Code:
Dont Need Any Code For Form2 Form1 Already Has The Code Built In.

Re: How To Make A Screen Recorder

Posted: Sat Jul 03, 2010 12:01 am
by zachman61
source upload please?

Re: How To Make A Screen Recorder

Posted: Sat Jul 03, 2010 10:54 am
by Lewis
Yes source please you have given a rong code because the components arnt correct. Please post the source.

Re: How To Make A Screen Recorder

Posted: Sat Jul 03, 2010 12:05 pm
by Mark
Lewis-Froom wrote:
Yes source please you have given a rong code because the components arnt correct. Please post the source.
This is where he got the tutorial from.

http://roylynandrews.webs.com/MiniScreenRecorder.html

Re: How To Make A Screen Recorder

Posted: Sat Jul 03, 2010 5:22 pm
by zachman61
stolen source lol

Re: How To Make A Screen Recorder

Posted: Sat Jul 03, 2010 5:30 pm
by Lewis
Right, I have followed the tut and added a Viewer and some other edits, here is the source:
Recorder.zip
Hopefully that helped anyone that wanted too see it?

Re: How To Make A Screen Recorder

Posted: Thu Jul 08, 2010 5:42 pm
by danic69
It'S nice but can you code the programm so, that it can hide when make a screenshot?

Re: How To Make A Screen Recorder

Posted: Thu Jul 15, 2010 1:50 am
by Moayad
cool