RePlay V1.0 - Miutubevids [The Tutorial!]
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
4 posts
Page 1 of 1
k so this took me quite a while 2 make and ur going to make it in about 2 miniutes
so u better preciate it
1.open VB
2. Select New progect
3. Select Windows Forms Application
4. Add a Save File Dialog and change its name to SaveFileDialog
5. Add a Timer
Name it Timer1 and set its properties:
interval = 100
enabled = true
6. Add another timer
Change the name to Timer and set its propeties:
Interval = 1
Enabled = False
7. Add another timer
Change its name to Timer_replay and set its properties:
Interval = 10
enabled = false
8. Add 3 Buttons and a prograssbar
Name the fist button: recordbt
Name the second button: stop_btn
Name the third button: replaybt
Name the third button: replay_pb
Change the text of the first button to: Record
Change the text of the second button to: Stop
Change the text of the third button to: RePlay
- Now at the top of your form
Make 2 Buttons
name 1 button: open
and name the other button: save
Change the open button's text to: Open
and you guessed it! the save buttons text to save
9. Make your form bigger and add a label with the text: Record:
add 2 checkboxes and name the first 1: cb_mousemoveclicks
name the second 1: cb_keypress
set the fist checkbox text to: Mouse Movements and Clicks
set the second checkbox text to: KeyPresses (BETA)
10. Add another label and set the text as: RePlay:
add 2 radiobuttons and name the first 1: forever_rb
name the second 1: time_rb
set the fist radiobutton text to: Forever
set the second radiobutton text to: (nothing)
Add a textbox next to the time_rb radiobutton
name that textbox: replay_times
set the textsbox's text to: 1
Now add a new Label next to the textbox wiith the text: Time(s)
then setthat labels name to: time
11. Add a Label with the text: Stop Recording/RePlaying Hotkey:
Add a combo box next to that and name it hotkey
go into the combobox propeties and select (Collection)
Delete all the others and add this in:
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
Escape
Delete
INSERT
12. Add 2 labels at the bottom of your form.
place the labels alongside eachother with a bit of space between them
name the fisrt label Xlb and the second label Ylb
now arrange your form to look like this:
:arrow: 13.Now Download this dll 14. Unzip WindowsHookLib.zip to the desktop
15. goback to your progect and click
File then
Add Reference then
Browse
now goto your desktop and double click windowshooklib.dll
16. now just copy this code ON TOP OF Public Class Form1
) COPY THIS CODE BETWEEN Public Class Form1 and End CLass
Thats all and i hope you enjoyed this tutorial and please post what you think and stuff
Please do not copy this tutorial anand or claim it as your own.
cooll; lmao;
SOURCE CODE:
http://www.mediafire.com/?kztjzy5ljzt
so u better preciate it

1.open VB
2. Select New progect
3. Select Windows Forms Application
4. Add a Save File Dialog and change its name to SaveFileDialog
5. Add a Timer
Name it Timer1 and set its properties:
interval = 100
enabled = true
6. Add another timer
Change the name to Timer and set its propeties:
Interval = 1
Enabled = False
7. Add another timer
Change its name to Timer_replay and set its properties:
Interval = 10
enabled = false
8. Add 3 Buttons and a prograssbar
Name the fist button: recordbt
Name the second button: stop_btn
Name the third button: replaybt
Name the third button: replay_pb
Change the text of the first button to: Record
Change the text of the second button to: Stop
Change the text of the third button to: RePlay
- Now at the top of your form
Make 2 Buttons
name 1 button: open
and name the other button: save
Change the open button's text to: Open
and you guessed it! the save buttons text to save
9. Make your form bigger and add a label with the text: Record:
add 2 checkboxes and name the first 1: cb_mousemoveclicks
name the second 1: cb_keypress
set the fist checkbox text to: Mouse Movements and Clicks
set the second checkbox text to: KeyPresses (BETA)
10. Add another label and set the text as: RePlay:
add 2 radiobuttons and name the first 1: forever_rb
name the second 1: time_rb
set the fist radiobutton text to: Forever
set the second radiobutton text to: (nothing)
Add a textbox next to the time_rb radiobutton
name that textbox: replay_times
set the textsbox's text to: 1
Now add a new Label next to the textbox wiith the text: Time(s)
then setthat labels name to: time
11. Add a Label with the text: Stop Recording/RePlaying Hotkey:
Add a combo box next to that and name it hotkey
go into the combobox propeties and select (Collection)
Delete all the others and add this in:
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
Escape
Delete
INSERT
12. Add 2 labels at the bottom of your form.
place the labels alongside eachother with a bit of space between them
name the fisrt label Xlb and the second label Ylb
now arrange your form to look like this:
:arrow: 13.Now Download this dll 14. Unzip WindowsHookLib.zip to the desktop
15. goback to your progect and click
File then
Add Reference then
Browse
now goto your desktop and double click windowshooklib.dll
16. now just copy this code ON TOP OF Public Class Form1
Code: Select all
17. (my favourite step Imports System.IO

Code: Select all
'Mouse CLick Declarations
Public Const MOUSEEVENTF_LEFTDOWN = &H2
Public Const MOUSEEVENTF_LEFTUP = &H4
Private Const MOUSEEVENTF_RIGHTDOWN = &H8
Private Const MOUSEEVENTF_RIGHTUP = &H10
'Minimize to Desktop Declarations
Private Declare Sub keybd_event Lib "user32" ( _
ByVal bVk As Byte, _
ByVal bScan As Byte, _
ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)
Const KEYEVENTF_KEYUP = &H2
Const VK_LWIN = &H5B
''''''''''
'mouse event api declaration
Declare Function apimouse_event Lib "user32.dll" Alias "mouse_event" (ByVal dwFlags As Int32, ByVal dX As Int32, ByVal dY As Int32, ByVal cButtons As Int32, ByVal dwExtraInfo As Int32) As Boolean
' end
'Class level declarations
Dim WithEvents khook As New WindowsHook.KeyboardHook
Dim WithEvents mhook As New WindowsHook.MouseHook
'codenstuff Moveable form
Public Const WM_NCLBUTTONDOWN As Integer = &HA1
Public Const HTCAPTION As Integer = &H2
<Runtime.InteropServices.DllImport("User32.dll")> _
Public Shared Function ReleaseCapture() As Boolean
End Function
<Runtime.InteropServices.DllImport("User32.dll")> _
Public Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
End Function
'end moveable form
'Declare Api's
Declare Function SetCursorPos& Lib "user32" (ByVal p As Point)
Dim stop_hotkey As String = "F5"
'Declare Variables
Dim replaymouse As Boolean
Dim replaykey As Boolean
Dim mustclear As Boolean
Dim hotkeytext As String
Dim loop_num
Dim record_mouse As Boolean
Dim Listbox_key_down As New ListBox
Dim Listbox_mouse As New ListBox
Dim listbox_mousemoveX As New ListBox
Dim listbox_mousemoveY As New ListBox
'Dim Listbox_key_up As New ListBox
Dim Countprogress As Integer
Dim Recording_yes As Boolean
Dim Replaying As Boolean
Dim count As Integer
Dim Mouse_Y As Integer
Dim Mouse_X As Integer
Dim p As Point
Dim Record As Boolean
Dim readlistbox As Integer = 0
Dim ReplayX As Integer
Dim ReplayY As Integer
Dim ChangecoordsX As Integer
Dim ChangecoordsY As Integer
'finish Declare Variables
'Recording Code
Private Sub Recording()
' listbox_mousemoveX.Enabled = True
' listbox_mousemoveY.Enabled = True
'listbox_mousemoveX.Location = New Point(288, 488)
'listbox_mousemoveX.Show()
'listbox_mousemoveY.Show()
End Sub
'Recording Code Finish
Private Sub replay_mouseclicks()
'****************** MOUSE CLICK CODE START ******************
If Listbox_mouse.SelectedItem = "down" Then
left_down()
ElseIf Listbox_mouse.SelectedItem = "up" Then
left_up()
End If
Listbox_mouse.SelectedIndex = Listbox_mouse.SelectedIndex + +1
End Sub
Private Sub replay_mousemove()
Dim posie As New Point(listbox_mousemoveX.SelectedItem, listbox_mousemoveY.SelectedItem)
SetCursorPos(posie)
If Not listbox_mousemoveX.SelectedIndex > listbox_mousemoveY.Items.Count Then
listbox_mousemoveX.SelectedIndex = listbox_mousemoveX.SelectedIndex + +1
listbox_mousemoveY.SelectedIndex = listbox_mousemoveX.SelectedIndex + +1
Else
Timer_Replay.Enabled = False
End If
End Sub
Private Sub start_rec()
'Mini to desktop
If hotkey.SelectedItem = "Delete" Then
hotkeytext = "Back"
Else
hotkeytext = hotkey.SelectedItem
End If
'keybd_event(VK_LWIN, 0, 0, 0)
'keybd_event(77, 0, 0, 0)
' keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)
'sdd'
mustclear = True
Recording_yes = True
Timer.Interval = 1
Timer.Enabled = True
cb_keypress.Enabled = False
cb_mousemoveclicks.Enabled = False
If cb_keypress.Checked = True Then
Me.khook.InstallHook()
End If
If cb_mousemoveclicks.Checked = True Then
Me.mhook.InstallHook()
record_mouse = True
Me.khook.InstallHook()
End If
End Sub
Private Sub replay_keypresses()
'****************** KEY START ******************
'Special
If Not Listbox_key_down.SelectedItem = "0" Then
If Listbox_key_down.SelectedItem = "ControlKey" Then
SendKeys.Send("^")
ElseIf Listbox_key_down.SelectedItem = "ShiftKey" Then
SendKeys.Send("+")
ElseIf Listbox_key_down.SelectedItem = "ShiftKey" Then
SendKeys.Send("%")
ElseIf Listbox_key_down.SelectedItem = "Insert" Then
SendKeys.Send("{INSERT}")
ElseIf Listbox_key_down.SelectedItem = "Home" Then
SendKeys.Send("{HOME}")
ElseIf Listbox_key_down.SelectedItem = "Pause" Then
SendKeys.Send("{BREAK}")
ElseIf Listbox_key_down.SelectedItem = "PageUp" Then
SendKeys.Send("{PGUP}")
ElseIf Listbox_key_down.SelectedItem = "PageDown" Then
SendKeys.Send("{PGDN}")
ElseIf Listbox_key_down.SelectedItem = "Scroll" Then
SendKeys.Send("{SCROLLLOCK}")
ElseIf Listbox_key_down.SelectedItem = "End" Then
SendKeys.Send("{End}")
ElseIf Listbox_key_down.SelectedItem = "Help" Then
SendKeys.Send("{Help}")
ElseIf Listbox_key_down.SelectedItem = "Back" Then
SendKeys.Send("{BS}")
ElseIf Listbox_key_down.SelectedItem = "PrintScreen" Then
SendKeys.Send("{PRTSC}")
ElseIf Listbox_key_down.SelectedItem = "NumLock" Then
SendKeys.Send("{NUMLOCK}")
''''ssssssssssssssssssssssssssssssss
'Arrow Keys
ElseIf Listbox_key_down.SelectedItem = "UP" Then
SendKeys.Send("{UP}")
ElseIf Listbox_key_down.SelectedItem = "DOWN" Then
SendKeys.Send("{DOWN}")
ElseIf Listbox_key_down.SelectedItem = "RIGHT" Then
SendKeys.Send("{RIGHT}")
ElseIf Listbox_key_down.SelectedItem = "LEFT" Then
SendKeys.Send("{LEFT}")
''''
'Other
ElseIf Listbox_key_down.SelectedItem = "Return" Then
SendKeys.Send("{ENTER}")
ElseIf Listbox_key_down.SelectedItem = "Space" Then
SendKeys.Send(" ")
ElseIf Listbox_key_down.SelectedItem = "Capital" Then
SendKeys.Send("{CAPSLOCK}")
''''
'Number Keys
ElseIf Listbox_key_down.SelectedItem = "D1" Then
SendKeys.Send("1")
ElseIf Listbox_key_down.SelectedItem = "D2" Then
SendKeys.Send("2")
ElseIf Listbox_key_down.SelectedItem = "D3" Then
SendKeys.Send("3")
ElseIf Listbox_key_down.SelectedItem = "D4" Then
SendKeys.Send("4")
ElseIf Listbox_key_down.SelectedItem = "D5" Then
SendKeys.Send("5")
ElseIf Listbox_key_down.SelectedItem = "D6" Then
SendKeys.Send("6")
ElseIf Listbox_key_down.SelectedItem = "D7" Then
SendKeys.Send("7")
ElseIf Listbox_key_down.SelectedItem = "D8" Then
SendKeys.Send("8")
ElseIf Listbox_key_down.SelectedItem = "D9" Then
SendKeys.Send("9")
ElseIf Listbox_key_down.SelectedItem = "D0" Then
SendKeys.Send("0")
'''''
'F keys
ElseIf Listbox_key_down.SelectedItem = "F1" Then
SendKeys.Send("{F1}")
ElseIf Listbox_key_down.SelectedItem = "F2" Then
SendKeys.Send("{F2}")
ElseIf Listbox_key_down.SelectedItem = "F3" Then
SendKeys.Send("{F3}")
ElseIf Listbox_key_down.SelectedItem = "F4" Then
SendKeys.Send("{F4}")
ElseIf Listbox_key_down.SelectedItem = "F5" Then
SendKeys.Send("{F5}")
ElseIf Listbox_key_down.SelectedItem = "F6" Then
SendKeys.Send("{F6}")
ElseIf Listbox_key_down.SelectedItem = "F7" Then
SendKeys.Send("{F7}")
ElseIf Listbox_key_down.SelectedItem = "F8" Then
SendKeys.Send("{F8}")
ElseIf Listbox_key_down.SelectedItem = "F9" Then
SendKeys.Send("{F9}")
ElseIf Listbox_key_down.SelectedItem = "F10" Then
SendKeys.Send("{F10}")
ElseIf Listbox_key_down.SelectedItem = "F11" Then
SendKeys.Send("{F11}")
ElseIf Listbox_key_down.SelectedItem = "F12" Then
SendKeys.Send("{F12}")
ElseIf Listbox_key_down.SelectedItem = "F13" Then
SendKeys.Send("{F13}")
ElseIf Listbox_key_down.SelectedItem = "F14" Then
SendKeys.Send("{F14}")
ElseIf Listbox_key_down.SelectedItem = "F15" Then
SendKeys.Send("{F15}")
ElseIf Listbox_key_down.SelectedItem = "F16" Then
SendKeys.Send("{F16}")
''''
'ALPHABET KEYS
ElseIf Listbox_key_down.SelectedItem = "A" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("A")
Else
SendKeys.Send("a")
End If
ElseIf Listbox_key_down.SelectedItem = "B" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("B")
Else
SendKeys.Send("b")
End If
ElseIf Listbox_key_down.SelectedItem = "C" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("C")
Else
SendKeys.Send("c")
End If
ElseIf Listbox_key_down.SelectedItem = "D" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("D")
Else
SendKeys.Send("d")
End If
ElseIf Listbox_key_down.SelectedItem = "E" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("E")
Else
SendKeys.Send("e")
End If
ElseIf Listbox_key_down.SelectedItem = "F" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("F")
Else
SendKeys.Send("f")
End If
ElseIf Listbox_key_down.SelectedItem = "G" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("G")
Else
SendKeys.Send("g")
End If
ElseIf Listbox_key_down.SelectedItem = "H" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("H")
Else
SendKeys.Send("h")
End If
ElseIf Listbox_key_down.SelectedItem = "I" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("I")
Else
SendKeys.Send("i")
End If
ElseIf Listbox_key_down.SelectedItem = "J" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("J")
Else
SendKeys.Send("j")
End If
ElseIf Listbox_key_down.SelectedItem = "K" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("K")
Else
SendKeys.Send("k")
End If
ElseIf Listbox_key_down.SelectedItem = "L" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("L")
Else
SendKeys.Send("l")
End If
ElseIf Listbox_key_down.SelectedItem = "M" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("M")
Else
SendKeys.Send("m")
End If
ElseIf Listbox_key_down.SelectedItem = "N" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("N")
Else
SendKeys.Send("n")
End If
ElseIf Listbox_key_down.SelectedItem = "O" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("O")
Else
SendKeys.Send("o")
End If
ElseIf Listbox_key_down.SelectedItem = "P" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("P")
Else
SendKeys.Send("p")
End If
ElseIf Listbox_key_down.SelectedItem = "Q" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("Q")
Else
SendKeys.Send("q")
End If
ElseIf Listbox_key_down.SelectedItem = "R" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("R")
Else
SendKeys.Send("r")
End If
ElseIf Listbox_key_down.SelectedItem = "S" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("S")
Else
SendKeys.Send("s")
End If
ElseIf Listbox_key_down.SelectedItem = "T" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("T")
Else
SendKeys.Send("t")
End If
ElseIf Listbox_key_down.SelectedItem = "U" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("U")
Else
SendKeys.Send("u")
End If
ElseIf Listbox_key_down.SelectedItem = "V" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("V")
Else
SendKeys.Send("v")
End If
ElseIf Listbox_key_down.SelectedItem = "W" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("W")
Else
SendKeys.Send("w")
End If
ElseIf Listbox_key_down.SelectedItem = "X" Then
If My.Computer.Keyboard.CapsLock = True Then
SendKeys.Send("X")
Else
SendKeys.Send("x")
End If
ElseIf Listbox_key_down.SelectedItem = "Y" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("Y")
Else
SendKeys.Send("y")
End If
ElseIf Listbox_key_down.SelectedItem = "Z" Then
If My.Computer.Keyboard.CapsLock Then
SendKeys.Send("Z")
Else
SendKeys.Send("z")
End If
End If
'SendKeys.Send(Listbox_key_up.SelectedItem)
End If
' Listbox_key_up.SelectedIndex = Listbox_key_up.SelectedIndex + +1
Listbox_key_down.SelectedIndex = Listbox_key_down.SelectedIndex + +1
'****************** Key END
End Sub
Public Sub rec()
listbox_mousemoveX.Items.Clear()
listbox_mousemoveY.Items.Clear()
Listbox_mouse.Items.Clear()
Listbox_key_down.Items.Clear()
If cb_keypress.Checked = False And cb_mousemoveclicks.Checked = False Then
MsgBox("Please check at least one optionof what you want to record", MsgBoxStyle.Information)
cb_keypress.Enabled = True
cb_mousemoveclicks.Enabled = True
Else
'Goto Desktop
' Call keybd_event(VK_LWIN, 0, 0, 0)
' Call keybd_event(77, 0, 0, 0)
' Call keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)
'
' Me.WindowState = FormWindowState.Minimized
''''''''
Recording_yes = True
Timer.Interval = 1
Timer.Enabled = True
cb_keypress.Enabled = False
cb_mousemoveclicks.Enabled = False
If cb_keypress.Checked = True Then
Me.khook.InstallHook()
ElseIf cb_mousemoveclicks.Checked = True Then
Me.mhook.InstallHook()
record_mouse = True
End If
End If
End Sub
'Replay Code Finish
'Stop start
Private Sub stop_rec_replay()
If Recording_yes = True Then
Record = False
Recordbt.Text = "Record"
Timer.Enabled = False
Recording_yes = False
cb_keypress.Enabled = True
cb_mousemoveclicks.Enabled = True
End If
If Replaying = True Then
Timer_Replay.Enabled = False
Replaying = False
cb_keypress.Enabled = True
cb_mousemoveclicks.Enabled = True
End If
replay_pb.Value = replay_pb.Maximum
End Sub
'stop finish
Private Sub Replay()
'loop_num -= 1
Try
listbox_mousemoveX.SelectedIndex = 0
listbox_mousemoveY.SelectedIndex = 0
Listbox_mouse.SelectedIndex = 0
Catch
End Try
'replay_pb.Minimum = listbox_mousemoveX.SelectedIndex
Try
Listbox_key_down.SelectedIndex = 0
Catch
End Try
If Not Listbox_mouse.SelectedItem = "0" Then
replaymouse = False
Else
replaymouse = True
End If
If Not Listbox_key_down.SelectedItem = "0" Then
replaykey = False
Else
replaykey = True
End If
If Recording_yes = True Then
MsgBox("You can not RePlay if your still Recording! Press the F5 to stop Recording.", MsgBoxStyle.Information)
Else
count = listbox_mousemoveY.Items.Count + 1
Timer_Replay.Interval = Timer.Interval
Timer_Replay.Enabled = True
Replaying = True
If cb_mousemoveclicks.Checked = True Then
replay_pb.Maximum = listbox_mousemoveX.Items.Count
Else
replay_pb.Maximum = Listbox_key_down.Items.Count
End If
replay_pb.Value = 0
End If
End Sub
Private Sub left_down()
Call apimouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
End Sub
Private Sub left_up()
Call apimouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
End Sub
Private Sub RePlay_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
mhook.Dispose()
khook.Dispose()
End Sub
Private Sub RePlay_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
'If e.KeyCode = Keys.hotkey.SelectedItem Then
'End
'End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
replaybt.Focus()
replay_pb.Style = ProgressBarStyle.Blocks
KeyPreview = True
replay_pb.Value = 0
time_rb.Checked = True
stop_hotkey = "F5"
hotkey.SelectedItem = "F5"
record_mouse = False
replay_times.Enabled = True
time.Enabled = True
End Sub
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
If e.Button = MouseButtons.Left Then
ReleaseCapture()
SendMessage(Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0)
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If Me.WindowState = FormWindowState.Maximized Then
Me.WindowState = FormWindowState.Normal
End If
Xlb.Text = ("X= " & Cursor.Position.X)
Ylb.Text = ("Y= " & Cursor.Position.Y)
End Sub
Private Sub recordbt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Button7_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs)
End Sub
Private Sub Timer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer.Tick
If mustclear = True Then
listbox_mousemoveX.Items.Clear()
listbox_mousemoveY.Items.Clear()
Listbox_mouse.Items.Clear()
Listbox_key_down.Items.Clear()
mustclear = False
End If
'****************** MOUSE CLICK CODE START ******************
If cb_mousemoveclicks.Checked = True Then
Listbox_mouse.Items.Add("0")
End If
'****************** Mouse MOVING CODE START ******************
If cb_keypress.Checked = True Then
' Listbox_key_up.Items.Add("0")
Listbox_key_down.Items.Add("0")
End If
If cb_mousemoveclicks.Checked = True Then
'Adds The Mouse Co-Ords To the Listbox
listbox_mousemoveX.Items.Add(Cursor.Position.X)
listbox_mousemoveY.Items.Add(Cursor.Position.Y)
End If
End Sub
Private Sub Replaybt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles replaybt.Click
If hotkey.SelectedItem = "Delete" Then
hotkeytext = "Back"
Else
hotkeytext = hotkey.SelectedItem
End If
If forever_rb.Checked = False Then
loop_num = replay_times.Text
Else
loop_num = "forever"
End If
Replay()
'Goto Desktop
' Call keybd_event(VK_LWIN, 0, 0, 0)
' Call keybd_event(77, 0, 0, 0)
' Call keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)
' Me.WindowState = FormWindowState.Minimized
''''''''
End Sub
Private Sub Timer_replay_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer_Replay.Tick
stop_btn.Focus()
Try
If cb_mousemoveclicks.Checked = True Then
If replaymouse = True Then
replay_mousemove()
replay_mouseclicks()
End If
' ElseIf cb_keypress.Checked = True Then
End If
If cb_keypress.Checked = True Then
If replaykey = True Then
replay_keypresses()
End If
End If
Catch
If forever_rb.Checked = False Then
If loop_num <= 1 Then
Replaying = False
Timer_Replay.Enabled = False
replay_pb.Value = replay_pb.Maximum
Me.WindowState = FormWindowState.Normal
MsgBox("RePlaying has Finished")
Else
loop_num -= 1
Replay()
End If
Else
Replay()
End If
End Try
If cb_mousemoveclicks.Checked = True Then
If listbox_mousemoveX.SelectedIndex > 1 Then
replay_pb.Value = listbox_mousemoveX.SelectedIndex
End If
ElseIf Listbox_key_down.SelectedIndex > 1 Then
replay_pb.Value = Listbox_key_down.SelectedIndex
End If
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles stop_btn.Click
stop_rec_replay()
End Sub
Private Sub mhook_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles mhook.MouseClick
End Sub
Private Sub mhook_MouseDown(ByVal sender As Object, ByVal e As WindowsHook.MouseEventArgs) Handles mhook.MouseDown
If Recording_yes = True Then
Listbox_mouse.Items.Add("down")
End If
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles replay_times.TextChanged
Try
If replay_times.Text < 1 Then
MsgBox("Please write a whole number in the text box that is bigger than 1")
End If
Dim tryint As Integer = replay_times.Text
Catch
MsgBox("Please write a whole number in the text box that is bigger than 1")
End Try
End Sub
Private Sub forever_rb_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
If forever_rb.Checked = True Then
replay_times.Enabled = True
time.Enabled = True
End If
End Sub
Private Sub forever_rb_Click(ByVal sender As Object, ByVal e As System.EventArgs)
If forever_rb.Checked = True Then
forever_rb.Checked = False
Else
forever_rb.Checked = True
End If
End Sub
Private Sub mhook_MouseUp(ByVal sender As Object, ByVal e As WindowsHook.MouseEventArgs) Handles mhook.MouseUp
If Recording_yes = True Then
Listbox_mouse.Items.Add("up")
End If
End Sub
Private Sub mhook_MouseWheel(ByVal sender As Object, ByVal e As WindowsHook.MouseEventArgs) Handles mhook.MouseWheel
End Sub
Private Sub hotkey_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hotkey.SelectedIndexChanged
If hotkey.SelectedItem = "Delete" Then
hotkeytext = "Back"
Else
hotkeytext = hotkey.SelectedItem
End If
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub khook_KeyDown(ByVal sender As Object, ByVal e As WindowsHook.KeyboardEventArgs) Handles khook.KeyDown
If e.KeyCode.ToString = hotkeytext Then
If Recording_yes = True Then
Record = False
Recordbt.Text = "Record"
Timer.Enabled = False
Recording_yes = False
cb_keypress.Enabled = True
cb_mousemoveclicks.Enabled = True
End If
If Replaying = True Then
Timer_Replay.Enabled = False
Replaying = False
cb_keypress.Enabled = True
cb_mousemoveclicks.Enabled = True
End If
replay_pb.Value = replay_pb.Maximum
End If
If Timer.Enabled = True Then
Listbox_key_down.Items.Add(e.KeyCode.ToString())
End If
End Sub
Private Sub khook_KeyUp(ByVal sender As Object, ByVal e As WindowsHook.KeyboardEventArgs) Handles khook.KeyUp
' If Timer.Enabled = True Then
'
' listbox_key_up.Items.Add(e.KeyCode.ToString())
' End If
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub TextBox2_TextChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub cb_keypress_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cb_keypress.CheckedChanged
If cb_keypress.Checked = True Then
MsgBox("This option is still being developed so it does not support double or more key combinations (Control +Alt+Delete, Alt+Tab, !...) ", MsgBoxStyle.Information)
End If
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
SendKeys.Send("^(d)")
End Sub
Private Sub recordbt_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Recordbt.Click
If cb_keypress.Checked = False And cb_mousemoveclicks.Checked = False Then
MsgBox("Please check at least one optionof what you want to record", MsgBoxStyle.Information)
cb_keypress.Enabled = True
cb_mousemoveclicks.Enabled = True
Else
rec()
End If
End Sub
Private Sub time_rb_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles time_rb.CheckedChanged
If time_rb.Checked = True Then
replay_times.Enabled = True
time.Enabled = True
Else
replay_times.Enabled = False
time.Enabled = False
End If
End Sub
Private Sub forever_rb_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles forever_rb.CheckedChanged
End Sub
Private Sub replay_pb_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles replay_pb.Click
End Sub
Private Sub SaveFileDialog_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles SaveFileDialog.Disposed
End Sub
Private Sub SaveFileDialog_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles SaveFileDialog.FileOk
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click
' Dim Stream As Stream
Dim saveFileDialog As New SaveFileDialog()
saveFileDialog.Filter = "Replay Save Files files (*.rep)|*.rep"
saveFileDialog.FilterIndex = 2
saveFileDialog.RestoreDirectory = True
If saveFileDialog.ShowDialog() = DialogResult.OK Then
Dim Fileloc As String = saveFileDialog.FileName
Dim sw As StreamWriter = New StreamWriter(Fileloc)
'Stream = saveFileDialog.OpenFile()
replay_pb.Maximum = 100
replay_pb.Value = 0
Try
listbox_mousemoveX.SelectedIndex = 0
listbox_mousemoveY.SelectedIndex = 0
Catch
If listbox_mousemoveX.SelectedIndex = "" Then
End If
End Try
Try
Listbox_mouse.SelectedIndex = 0
Catch
End Try
Try
Listbox_key_down.SelectedIndex = 0
Catch
End Try
sw.WriteLine(Listbox_mouse.Items.Count, Fileloc)
sw.WriteLine(listbox_mousemoveX.Items.Count, Fileloc)
sw.WriteLine(listbox_mousemoveY.Items.Count, Fileloc)
sw.WriteLine(Listbox_key_down.Items.Count, Fileloc)
For i = 1 To Listbox_mouse.Items.Count
' sw.WriteLine(listbox_mousemoveX.SelectedItem)
Try
If Not Listbox_mouse.SelectedIndex = Listbox_mouse.Items.Count Then
sw.WriteLine(Listbox_mouse.SelectedItem)
Listbox_mouse.SelectedIndex = Listbox_mouse.SelectedIndex + 1
End If
Catch
End Try
Next
For i = 1 To listbox_mousemoveX.Items.Count
Try
If Not listbox_mousemoveX.SelectedIndex = listbox_mousemoveX.Items.Count Then
sw.WriteLine(listbox_mousemoveX.SelectedItem)
listbox_mousemoveX.SelectedIndex = listbox_mousemoveX.SelectedIndex + 1
End If
Catch
replay_pb.Value += 25
End Try
Next
For i = 1 To listbox_mousemoveY.Items.Count
Try
If Not listbox_mousemoveY.SelectedIndex = listbox_mousemoveY.Items.Count Then
sw.WriteLine(listbox_mousemoveY.SelectedItem)
listbox_mousemoveY.SelectedIndex = listbox_mousemoveY.SelectedIndex + 1
End If
Catch
replay_pb.Value += 25
End Try
Next
For i = 1 To Listbox_key_down.Items.Count
Try
If Not Listbox_key_down.SelectedIndex = Listbox_key_down.Items.Count Then
sw.WriteLine(Listbox_key_down.SelectedItem)
Listbox_key_down.SelectedIndex = Listbox_key_down.SelectedIndex + 1
End If
Catch
replay_pb.Value += 25
End Try
Next
replay_pb.Value = replay_pb.Maximum
MsgBox("Your Recording has been saved!", MsgBoxStyle.Information)
sw.Close()
End If
'SaveFileDialog.ShowDialog()
End Sub
Private Sub recordbt_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Recordbt.Leave
End Sub
Private Sub recordbt_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Recordbt.MouseLeave
End Sub
Private Sub recordbt_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Recordbt.MouseUp
'Mini to desktop
If hotkey.SelectedItem = "Delete" Then
hotkeytext = "Back"
Else
hotkeytext = hotkey.SelectedItem
End If
'keybd_event(VK_LWIN, 0, 0, 0)
'keybd_event(77, 0, 0, 0)
' keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)
'sdd'
If cb_keypress.Checked = False And cb_mousemoveclicks.Checked = False Then
MsgBox("Please check at least one optionof what you want to record", MsgBoxStyle.Information)
cb_keypress.Enabled = True
cb_mousemoveclicks.Enabled = True
Else
mustclear = True
Recording_yes = True
Timer.Interval = 1
Timer.Enabled = True
cb_keypress.Enabled = False
cb_mousemoveclicks.Enabled = False
If cb_keypress.Checked = True Then
Me.khook.InstallHook()
End If
If cb_mousemoveclicks.Checked = True Then
Me.mhook.InstallHook()
record_mouse = True
Me.khook.InstallHook()
End If
End If
End Sub
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles open.Click
Dim oFile As System.IO.File
Dim oRead As System.IO.StreamReader
Dim openFileDialog As New OpenFileDialog()
openFileDialog.Filter = "rep files (*.rep)|*.rep"
openFileDialog.FilterIndex = 2
openFileDialog.RestoreDirectory = True
openFileDialog.ShowDialog()
If openFileDialog.ShowDialog() = DialogResult.OK Then
replay_pb.Maximum = 100
replay_pb.Value = 0
Try
Dim Fileloc As String = openFileDialog.FileName
oRead = oFile.OpenText(Fileloc)
Dim mousecount As Integer = oRead.ReadLine()
Dim mousex As Integer = oRead.ReadLine()
Dim mouseY As Integer = oRead.ReadLine()
Dim keyd As Integer = oRead.ReadLine()
listbox_mousemoveX.Items.Clear()
listbox_mousemoveY.Items.Clear()
Listbox_mouse.Items.Clear()
Listbox_key_down.Items.Clear()
For i = 1 To mousecount
Listbox_mouse.Items.Add(oRead.ReadLine())
Next
replay_pb.Value += 25
For i = 1 To mousex
listbox_mousemoveX.Items.Add(oRead.ReadLine())
Next
replay_pb.Value += 25
For i = 1 To mouseY
listbox_mousemoveY.Items.Add(oRead.ReadLine())
Next
replay_pb.Value += 25
For i = 1 To keyd
Listbox_key_down.Items.Add(oRead.ReadLine())
Next
replay_pb.Value += 25
MsgBox("The file was successfully opened", MsgBoxStyle.Information)
oRead.Close()
Catch
MsgBox("there was an error when opening the file", MsgBoxStyle.Critical)
End Try
End If
End Sub
Thats all and i hope you enjoyed this tutorial and please post what you think and stuff

Please do not copy this tutorial anand or claim it as your own.
cooll; lmao;
SOURCE CODE:
http://www.mediafire.com/?kztjzy5ljzt
You do not have the required permissions to view the files attached to this post.
thank you very much Miutubevids this tutorial is really good and well explained.
So this uses a DLL
I thought it was some random coding in vb not using references
Thanks again
Robby
So this uses a DLL
I thought it was some random coding in vb not using references

Thanks again
Robby
Robby wrote:thank you very much Miutubevids this tutorial is really good and well explained.Man! i wish it was
So this uses a DLL
I thought it was some random coding in vb not using references
Thanks again
Robby
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023