Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Main
- Dim x As Integer = 0 'move mouse x amount
- Dim y As Integer = 0 ' move mouse y amount
- Dim locx As Integer = 0 'actual mouse location x
- Dim locy As Integer = 0 ' actual mouse location y
- Dim temploc As Integer = 0 ' to compare and verify moved
- Dim cycle As Integer = 0 ' animation timer, not implemented yet
- Dim flip As Boolean = False 'leftright orientation
- Dim flipv As Integer = 0 'updown orientation
- Dim wlogic As Boolean = False 'main while loop for timer1
- Dim editBox As Boolean = False ' edit walls
- Dim editMouse As Boolean = False ' place mouse
- Dim editGoal As Boolean = False ' place goal
- Dim mousemove1 As Boolean = False 'moved last turn, not implemented yet
- Dim mazeFin As Integer = 0 ' found goal, not implemented yet
- Dim m_vis As Boolean = True ' true if mouse is visible
- Dim g_vis As Boolean = True ' true if goal is visible
- Dim g_locx As Integer = 240 ' actual location goal x
- Dim g_locy As Integer = 360 ' actual location goal y
- Dim trackx As Integer = 0 'track location check
- Dim tracky As Integer = 0 'track location check
- Dim ncell As Integer = 1 ' has cell number
- Dim gcell As Integer = 0 ' goal cell number
- Dim lcell As Integer = 1 ' last cell mouse
- Dim tracklogic As Boolean = False ' enable tracks
- Dim mousechar As Integer = 0 ' current mouse char 0 = simplemouse, 1 = car, 2 = zelda
- Dim goalchar As Integer = 0 ' current cheese goal = 0, 1 = house, 2 = triforce, mousetrap = 3
- Dim blooded As Boolean = False ' true if mouse has been clicked
- Dim pool As Integer = 0
- Dim runbutton As Boolean = True ' logic to switch main run button from run to pause and back
- Private Sub Walledit(ByVal Sender As Object) 'toggles wall visibility, white to black
- 'Walledit(sender) to call in label_click event arg
- If editBox = True Then
- If Sender.backcolor = Color.White Then
- Sender.backcolor = Color.Black
- ElseIf Sender.backcolor = Color.Black Then
- Sender.backcolor = Color.White
- End If
- End If
- End Sub
- Private Sub toolseditmaze_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolseditmaze.Click
- If toolseditmaze.Checked = True Then
- toolssetmouse.Enabled = True
- toolssetgoal.Enabled = True
- toolseditwalls.Enabled = True
- ElseIf toolseditmaze.Checked = False Then
- toolssetmouse.Enabled = False
- toolssetgoal.Enabled = False
- toolseditwalls.Enabled = False
- End If
- End Sub
- Private Sub toolseditwalls_CheckState(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolseditwalls.CheckStateChanged
- 'edit maze menu option, same as edit box
- If toolseditmaze.Checked = True Then
- editBox = True
- ElseIf toolseditmaze.Checked = False Then
- editBox = False
- End If
- End Sub
- Private Sub filequit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles filequit.Click
- Me.Close() ' quit option in file menu
- End Sub
- Private Sub fileabout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles fileabout.Click
- 'about option in file menu
- MessageBox.Show("MicroMouse Simulator 2011. Created by: Blake Johnson, Johnathan Drake, William Rodgers")
- End Sub
- Private Sub toolssetmouse_CheckStateChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolssetmouse.CheckStateChanged
- If toolseditmaze.Checked = True Then
- If toolssetmouse.Checked = True Then
- Mouse.Hide()
- m_vis = False
- editMouse = True
- cellInit()
- cellToggle(toggle:="on") ' turns cells visible
- ElseIf toolssetmouse.Checked = False Then
- editMouse = False
- cellToggle(toggle:="off") ' turns cells invisible
- Mouse.Show()
- m_vis = True
- End If
- End If
- End Sub
- Private Sub toolssetgoal_CheckStateChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolssetgoal.CheckStateChanged
- 'MessageBox.Show("goal tool strip menu accessed")
- If toolssetgoal.Checked = True Then
- Goal.Hide()
- g_vis = False
- editGoal = True
- cellInit()
- cellToggle(toggle:="on") ' turns cells visible
- ElseIf toolssetgoal.Checked = False Then
- Goal.Show()
- editGoal = False
- cellToggle(toggle:="off") ' turns cells invisible
- g_vis = True
- End If
- End Sub
- Private Sub toolsenabletracks_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolsenabletracks.CheckedChanged
- If toolsenabletracks.Checked = True Then
- tracklogic = True
- ElseIf toolsenabletracks.Checked = False Then
- tracklogic = False
- End If
- 'MessageBox.Show(tracklogic)
- End Sub
- 'zelda mouse option
- Private Sub optionschangemousezelda_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optionschangemousezelda.Click
- mousechar = 2
- Me.Mouse.Image = MicroMouse.My.Resources.zeldadown
- End Sub
- Private Sub optionschangemousecar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optionschangemousecar.Click
- mousechar = 1
- Me.Mouse.Image = MicroMouse.My.Resources.cardown
- End Sub
- Private Sub optionschangemousesimple_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optionschangemousesimple.Click
- mousechar = 0
- Me.Mouse.Image = MicroMouse.My.Resources.teardropdown
- End Sub
- Private Sub optionschangegoalcheese_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optionschangegoalcheese.Click
- goalchar = 0
- Me.Goal.Image = MicroMouse.My.Resources.Cheese_icon
- End Sub
- Private Sub optionschangegoalhouse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optionschangegoalhouse.Click
- goalchar = 1
- Me.Goal.Image = MicroMouse.My.Resources.house
- End Sub
- Private Sub optionschangegoaltriforce_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optionschangegoaltriforce.Click
- goalchar = 2
- Me.Goal.Image = MicroMouse.My.Resources.triforce
- End Sub
- Private Sub optionschangegoalmousetrap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optionschangegoalmousetrap.Click
- goalchar = 3
- Me.Goal.Image = MicroMouse.My.Resources.Mousetrap
- End Sub
- 'smack down option
- Private Sub Mouse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Mouse.Click
- blooded = True
- If ncell = 1 Then
- pool = 1
- cell1.Image = My.Resources.bloodprint
- End If
- '...for every other cell 2 - 25
- End Sub
- Private Sub cellInit() 'returns cell boxes to default backcolor
- cell1.BackColor = Color.Gainsboro
- cell2.BackColor = Color.Gainsboro
- cell3.BackColor = Color.Gainsboro
- cell4.BackColor = Color.Gainsboro
- cell5.BackColor = Color.Gainsboro
- cell6.BackColor = Color.Gainsboro
- cell7.BackColor = Color.Gainsboro
- cell8.BackColor = Color.Gainsboro
- cell9.BackColor = Color.Gainsboro
- cell10.BackColor = Color.Gainsboro
- cell11.BackColor = Color.Gainsboro
- cell12.BackColor = Color.Gainsboro
- cell13.BackColor = Color.Gainsboro
- cell14.BackColor = Color.Gainsboro
- cell15.BackColor = Color.Gainsboro
- cell16.BackColor = Color.Gainsboro
- cell17.BackColor = Color.Gainsboro
- cell18.BackColor = Color.Gainsboro
- cell19.BackColor = Color.Gainsboro
- cell20.BackColor = Color.Gainsboro
- cell21.BackColor = Color.Gainsboro
- cell22.BackColor = Color.Gainsboro
- cell23.BackColor = Color.Gainsboro
- cell24.BackColor = Color.Gainsboro
- cell25.BackColor = Color.Gainsboro
- End Sub
- Private Sub cellToggle(ByVal toggle As String) 'toggles cell boxes, String toggle on/off
- If toggle = "on" Then
- cell1.Visible = True
- cell2.Visible = True
- cell3.Visible = True
- cell4.Visible = True
- cell5.Visible = True
- cell6.Visible = True
- cell7.Visible = True
- cell8.Visible = True
- cell9.Visible = True
- cell10.Visible = True
- cell11.Visible = True
- cell12.Visible = True
- cell13.Visible = True
- cell14.Visible = True
- cell15.Visible = True
- cell16.Visible = True
- cell17.Visible = True
- cell18.Visible = True
- cell19.Visible = True
- cell20.Visible = True
- cell21.Visible = True
- cell22.Visible = True
- cell23.Visible = True
- cell24.Visible = True
- cell25.Visible = True
- ElseIf toggle = "off" Then
- cell1.Visible = False
- cell2.Visible = False
- cell3.Visible = False
- cell4.Visible = False
- cell5.Visible = False
- cell6.Visible = False
- cell7.Visible = False
- cell8.Visible = False
- cell9.Visible = False
- cell10.Visible = False
- cell11.Visible = False
- cell12.Visible = False
- cell13.Visible = False
- cell14.Visible = False
- cell15.Visible = False
- cell16.Visible = False
- cell17.Visible = False
- cell18.Visible = False
- cell19.Visible = False
- cell20.Visible = False
- cell21.Visible = False
- cell22.Visible = False
- cell23.Visible = False
- cell24.Visible = False
- cell25.Visible = False
- End If
- End Sub
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- 'showdata button
- ' infobox2.Text = "Mouse Location: " + "( " + Mouse.Left.ToString + ", " + Mouse.Top.ToString + ")" + vbNewLine + "Cell:" + ncell.ToString
- ' ncell = findCell(locx, locy)
- End Sub
- 'reset maze option
- 'key input event------------------------------------------------
- Private Sub Main_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
- If runmanualmove.Checked = True Then
- 'keydown event move mouse with keyboard asdw
- If e.KeyCode = Keys.D Then 'move right
- flipv = 0
- If locx <= 300 Then
- x = 100
- temploc = locx
- locx = locx + x
- End If
- If temploc > locx Or temploc < locx Then
- mousemove1 = True
- End If
- wlogic = True
- flip = False
- ElseIf e.KeyCode = Keys.A Then 'move left
- flipv = 0
- If locx >= 100 Then
- x = -100
- temploc = locx
- locx = locx + x
- End If
- If temploc > locx Or temploc < locx Then
- mousemove1 = True
- End If
- flip = True
- wlogic = True
- ElseIf e.KeyCode = Keys.W Then 'move up
- flipv = 1
- If locy >= 100 Then
- y = -100
- temploc = locy
- locy = locy + y
- End If
- If temploc > locy Or temploc < locy Then
- mousemove1 = True
- End If
- wlogic = True
- ElseIf e.KeyCode = Keys.S Then 'move down
- flipv = 2
- If locy <= 300 Then
- y = 100
- temploc = locy
- locy = locy + y
- End If
- If temploc > locy Or temploc < locy Then
- mousemove1 = True
- End If
- wlogic = True
- End If
- End If
- End Sub
- Private Sub trackMaker(ByVal ncell As Integer, ByVal lcell As Integer) 'makes footprints appear in last cell visited
- If ncell = 1 Then
- cell1.BackColor = Color.PaleGreen
- cell1.Visible = False
- 'MessageBox.Show(Mouse.Visible.ToString)
- End If
- If lcell = 1 And ncell <> 1 And blooded = True Then
- If mousechar = 0 Then
- If flip = False And flipv = 0 Then
- If pool <> 1 Then ' some kind of blood spot saver variable
- cell1.Image = My.Resources.printrightb
- End If
- ElseIf flip = True And flipv = 0 Then
- If pool <> 1 Then
- cell1.Image = My.Resources.printleftb
- End If
- ElseIf flipv = 1 Then
- If pool <> 1 Then
- cell1.Image = My.Resources.printupb
- End If
- ElseIf flipv = 2 Then
- If pool <> 1 Then
- cell1.Image = My.Resources.printdownb
- End If
- End If
- ElseIf mousechar = 1 Then
- If flip = False And flipv = 0 Then
- cell1.Image = My.Resources.tireright
- ElseIf flip = True And flipv = 0 Then
- cell1.Image = My.Resources.tireleft
- ElseIf flipv = 1 Then
- cell1.Image = My.Resources.tireup
- ElseIf flipv = 2 Then
- cell1.Image = My.Resources.tiredown
- End If
- ElseIf mousechar = 2 Then
- If flip = False And flipv = 0 Then
- cell1.Image = My.Resources.bootprintright
- ElseIf flip = True And flipv = 0 Then
- cell1.Image = My.Resources.bootprintleft
- ElseIf flipv = 1 Then
- cell1.Image = My.Resources.bootprintup
- ElseIf flipv = 2 Then
- cell1.Image = My.Resources.bootprintdown
- End If
- End If
- End If
- If lcell = 1 And ncell <> 1 And blooded = False Then
- If mousechar = 0 Then
- If flip = False And flipv = 0 Then
- cell1.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell1.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell1.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell1.Image = My.Resources.printdown
- End If
- ElseIf mousechar = 1 Then
- If flip = False And flipv = 0 Then
- cell1.Image = My.Resources.tireright
- ElseIf flip = True And flipv = 0 Then
- cell1.Image = My.Resources.tireleft
- ElseIf flipv = 1 Then
- cell1.Image = My.Resources.tireup
- ElseIf flipv = 2 Then
- cell1.Image = My.Resources.tiredown
- End If
- ElseIf mousechar = 2 Then
- If flip = False And flipv = 0 Then
- cell1.Image = My.Resources.bootprintright
- ElseIf flip = True And flipv = 0 Then
- cell1.Image = My.Resources.bootprintleft
- ElseIf flipv = 1 Then
- cell1.Image = My.Resources.bootprintup
- ElseIf flipv = 2 Then
- cell1.Image = My.Resources.bootprintdown
- End If
- End If
- End If
- cell1.BackColor = Color.White
- cell1.Show()
- If ncell = 2 Then
- cell2.BackColor = Color.PaleGreen
- cell2.Visible = False
- End If
- If lcell = 2 And ncell <> 2 Then
- If flip = False And flipv = 0 Then
- cell2.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell2.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell2.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell2.Image = My.Resources.printdown
- End If
- cell2.BackColor = Color.White
- cell2.Show()
- End If
- If ncell = 3 Then
- cell3.BackColor = Color.PaleGreen
- cell3.Visible = False
- End If
- If lcell = 3 And ncell <> 3 Then
- If flip = False And flipv = 0 Then
- cell3.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell3.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell3.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell3.Image = My.Resources.printdown
- End If
- cell3.BackColor = Color.White
- cell3.Show()
- End If
- If ncell = 4 Then
- cell4.BackColor = Color.PaleGreen
- cell4.Visible = False
- End If
- If lcell = 4 And ncell <> 4 Then
- If flip = False And flipv = 0 Then
- cell4.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell4.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell4.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell4.Image = My.Resources.printdown
- End If
- cell4.BackColor = Color.White
- cell4.Show()
- End If
- If ncell = 5 Then
- cell5.BackColor = Color.PaleGreen
- cell5.Visible = False
- End If
- If lcell = 5 And ncell <> 5 Then
- If flip = False And flipv = 0 Then
- cell5.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell5.Image = My.Resources.printleft
- ElseIf flipv = 5 Then
- cell5.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell5.Image = My.Resources.printdown
- End If
- cell5.BackColor = Color.White
- cell5.Show()
- End If
- If ncell = 6 Then
- cell6.BackColor = Color.PaleGreen
- cell6.Visible = False
- End If
- If lcell = 6 And ncell <> 6 Then
- If flip = False And flipv = 0 Then
- cell6.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell6.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell6.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell6.Image = My.Resources.printdown
- End If
- cell6.BackColor = Color.White
- cell6.Show()
- End If
- If ncell = 7 Then
- cell7.BackColor = Color.PaleGreen
- cell7.Visible = False
- End If
- If lcell = 7 And ncell <> 7 Then
- If flip = False And flipv = 0 Then
- cell7.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell7.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell7.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell7.Image = My.Resources.printdown
- End If
- cell7.BackColor = Color.White
- cell7.Show()
- End If
- If ncell = 8 Then
- cell8.BackColor = Color.PaleGreen
- cell8.Visible = False
- End If
- If lcell = 8 And ncell <> 8 Then
- If flip = False And flipv = 0 Then
- cell8.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell8.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell8.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell8.Image = My.Resources.printdown
- End If
- cell8.BackColor = Color.White
- cell8.Show()
- End If
- If ncell = 9 Then
- cell9.BackColor = Color.PaleGreen
- cell9.Visible = False
- End If
- If lcell = 9 And ncell <> 9 Then
- If flip = False And flipv = 0 Then
- cell9.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell9.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell9.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell9.Image = My.Resources.printdown
- End If
- cell9.BackColor = Color.White
- cell9.Show()
- End If
- If ncell = 10 Then
- cell10.BackColor = Color.PaleGreen
- cell10.Visible = False
- End If
- If lcell = 10 And ncell <> 10 Then
- If flip = False And flipv = 0 Then
- cell10.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell10.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell10.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell10.Image = My.Resources.printdown
- End If
- cell10.BackColor = Color.White
- cell10.Show()
- End If
- If ncell = 11 Then
- cell11.BackColor = Color.PaleGreen
- cell11.Visible = False
- End If
- If lcell = 11 And ncell <> 11 Then
- If flip = False And flipv = 0 Then
- cell11.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell11.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell11.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell11.Image = My.Resources.printdown
- End If
- cell11.BackColor = Color.White
- cell11.Show()
- End If
- If ncell = 12 Then
- cell12.BackColor = Color.PaleGreen
- cell12.Visible = False
- End If
- If lcell = 12 And ncell <> 12 Then
- If flip = False And flipv = 0 Then
- cell12.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell12.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell12.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell12.Image = My.Resources.printdown
- End If
- cell12.BackColor = Color.White
- cell12.Show()
- End If
- If ncell = 13 Then
- cell13.BackColor = Color.PaleGreen
- cell13.Visible = False
- End If
- If lcell = 13 And ncell <> 13 Then
- If flip = False And flipv = 0 Then
- cell13.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell13.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell13.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell13.Image = My.Resources.printdown
- End If
- cell13.BackColor = Color.White
- cell13.Show()
- End If
- If ncell = 14 Then
- cell14.BackColor = Color.PaleGreen
- cell14.Visible = False
- End If
- If lcell = 14 And ncell <> 14 Then
- If flip = False And flipv = 0 Then
- cell14.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell14.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell14.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell14.Image = My.Resources.printdown
- End If
- cell14.BackColor = Color.White
- cell14.Show()
- End If
- If ncell = 15 Then
- cell15.BackColor = Color.PaleGreen
- cell15.Visible = False
- End If
- If lcell = 15 And ncell <> 15 Then
- If flip = False And flipv = 0 Then
- cell15.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell15.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell15.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell15.Image = My.Resources.printdown
- End If
- cell15.BackColor = Color.White
- cell15.Show()
- End If
- If ncell = 16 Then
- cell16.BackColor = Color.PaleGreen
- cell16.Visible = False
- End If
- If lcell = 16 And ncell <> 16 Then
- If flip = False And flipv = 0 Then
- cell16.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell16.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell16.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell16.Image = My.Resources.printdown
- End If
- cell16.BackColor = Color.White
- cell16.Show()
- End If
- If ncell = 17 Then
- cell17.BackColor = Color.PaleGreen
- cell17.Visible = False
- End If
- If lcell = 17 And ncell <> 17 Then
- If flip = False And flipv = 0 Then
- cell17.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell17.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell17.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell17.Image = My.Resources.printdown
- End If
- cell17.BackColor = Color.White
- cell17.Show()
- End If
- If ncell = 18 Then
- cell18.BackColor = Color.PaleGreen
- cell18.Visible = False
- End If
- If lcell = 18 And ncell <> 18 Then
- If flip = False And flipv = 0 Then
- cell18.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell18.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell18.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell18.Image = My.Resources.printdown
- End If
- cell18.BackColor = Color.White
- cell18.Show()
- End If
- If ncell = 19 Then
- cell19.BackColor = Color.PaleGreen
- cell19.Visible = False
- End If
- If lcell = 19 And ncell <> 19 Then
- If flip = False And flipv = 0 Then
- cell19.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell19.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell19.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell19.Image = My.Resources.printdown
- End If
- cell19.BackColor = Color.White
- cell19.Show()
- End If
- If ncell = 20 Then
- cell20.BackColor = Color.PaleGreen
- cell20.Visible = False
- End If
- If lcell = 20 And ncell <> 20 Then
- If flip = False And flipv = 0 Then
- cell20.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell20.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell20.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell20.Image = My.Resources.printdown
- End If
- cell20.BackColor = Color.White
- cell20.Show()
- End If
- If ncell = 21 Then
- cell21.BackColor = Color.PaleGreen
- cell21.Visible = False
- End If
- If lcell = 21 And ncell <> 21 Then
- If flip = False And flipv = 0 Then
- cell21.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell21.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell21.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell21.Image = My.Resources.printdown
- End If
- cell21.BackColor = Color.White
- cell21.Show()
- End If
- If ncell = 22 Then
- cell22.BackColor = Color.PaleGreen
- cell22.Visible = False
- End If
- If lcell = 22 And ncell <> 22 Then
- If flip = False And flipv = 0 Then
- cell22.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell22.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell22.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell22.Image = My.Resources.printdown
- End If
- cell22.BackColor = Color.White
- cell22.Show()
- End If
- If ncell = 23 Then
- cell23.BackColor = Color.PaleGreen
- cell23.Visible = False
- End If
- If lcell = 23 And ncell <> 23 Then
- If flip = False And flipv = 0 Then
- cell23.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell23.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell23.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell23.Image = My.Resources.printdown
- End If
- cell23.BackColor = Color.White
- cell23.Show()
- End If
- If ncell = 24 Then
- cell24.BackColor = Color.PaleGreen
- cell24.Visible = False
- End If
- If lcell = 24 And ncell <> 24 Then
- If flip = False And flipv = 0 Then
- cell24.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell24.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell24.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell24.Image = My.Resources.printdown
- End If
- cell24.BackColor = Color.White
- cell24.Show()
- End If
- If ncell = 25 Then
- cell25.BackColor = Color.PaleGreen
- cell25.Visible = False
- End If
- If lcell = 25 And ncell <> 25 Then
- If flip = False And flipv = 0 Then
- cell25.Image = My.Resources.printright
- ElseIf flip = True And flipv = 0 Then
- cell25.Image = My.Resources.printleft
- ElseIf flipv = 1 Then
- cell25.Image = My.Resources.printup
- ElseIf flipv = 2 Then
- cell25.Image = My.Resources.printdown
- End If
- cell25.BackColor = Color.White
- cell25.Show()
- End If
- End Sub
- Private Function findCell(ByVal x As Integer, ByVal y As Integer) As Integer 'finds mouse current cell
- Dim cell As Integer = 0
- If x = 0 And y = 0 Then
- cell = 1
- ElseIf x = 100 And y = 0 Then
- cell = 2
- ElseIf x = 200 And y = 0 Then
- cell = 3
- ElseIf x = 300 And y = 0 Then
- cell = 4
- ElseIf x = 400 And y = 0 Then
- cell = 5
- ElseIf x = 0 And y = 100 Then
- cell = 6
- ElseIf x = 100 And y = 100 Then
- cell = 7
- ElseIf x = 200 And y = 100 Then
- cell = 8
- ElseIf x = 300 And y = 100 Then
- cell = 9
- ElseIf x = 400 And y = 100 Then
- cell = 10
- ElseIf x = 0 And y = 200 Then
- cell = 11
- ElseIf x = 100 And y = 200 Then
- cell = 12
- ElseIf x = 200 And y = 200 Then
- cell = 13
- ElseIf x = 300 And y = 200 Then
- cell = 14
- ElseIf x = 400 And y = 200 Then
- cell = 15
- ElseIf x = 0 And y = 300 Then
- cell = 16
- ElseIf x = 100 And y = 300 Then
- cell = 17
- ElseIf x = 200 And y = 300 Then
- cell = 18
- ElseIf x = 300 And y = 300 Then
- cell = 19
- ElseIf x = 400 And y = 300 Then
- cell = 20
- ElseIf x = 0 And y = 400 Then
- cell = 21
- ElseIf x = 100 And y = 400 Then
- cell = 22
- ElseIf x = 200 And y = 400 Then
- cell = 23
- ElseIf x = 300 And y = 400 Then
- cell = 24
- ElseIf x = 400 And y = 400 Then
- cell = 25
- End If
- Return cell
- End Function
- 'main timer event------------------------------------------------main while loop
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- 'textbox data
- infobox.Text = "Mouse Location: " + "( " + Mouse.Left.ToString + ", " + Mouse.Top.ToString + ")" + vbNewLine + "Cell:" + ncell.ToString + vbNewLine + "last cell: " + lcell.ToString + vbNewLine + "Relative loc: (" + locx.ToString + "," + locy.ToString + ")"
- infobox2.Text = "Goal loc: (" + Me.Goal.Left.ToString + ", " + Me.Goal.Top.ToString + ")" + vbNewLine + "Goal Cell: " + gcell.ToString + vbNewLine + "goal x/y: (" + g_locx.ToString + ", " + g_locy.ToString + ")"
- infobox3.Text = "Walledit: " + editBox.ToString + vbNewLine + "Tracks: " + tracklogic.ToString + vbNewLine + "SetMouse: " + editMouse.ToString + vbNewLine + "SetGoal: " + editGoal.ToString
- While wlogic = True
- 'moves the mouse relative to top left corner
- While mousemove1 = True
- lcell = ncell 'last cell mouse was in
- ncell = findCell(locx, locy)
- gcell = findCell(g_locx, g_locy)
- Me.Mouse.Left = Me.Mouse.Left + x
- Me.Mouse.Top = Me.Mouse.Top + y
- If tracklogic = True Then
- trackMaker(ncell, lcell)
- End If
- 'resets move x, y
- x = 0
- y = 0
- mousemove1 = False
- End While
- 'changes the image and orientation ' current mouse char 0 = simplemouse, 1 = car, 2 = zelda
- If mousechar = 0 Then
- If flip = True Then
- Me.Mouse.Image = My.Resources.teardropleft
- ElseIf flip = False Then
- Me.Mouse.Image = My.Resources.teardropright
- End If
- If flipv = 1 Then
- Me.Mouse.Image = My.Resources.teardropup
- ElseIf flipv = 2 Then
- Me.Mouse.Image = My.Resources.teardropdown
- End If
- End If
- If mousechar = 1 Then
- If flip = True Then
- Me.Mouse.Image = My.Resources.carleft
- ElseIf flip = False Then
- Me.Mouse.Image = My.Resources.car
- End If
- If flipv = 1 Then
- Me.Mouse.Image = My.Resources.carup
- ElseIf flipv = 2 Then
- Me.Mouse.Image = My.Resources.cardown
- End If
- End If
- If mousechar = 2 Then
- If flip = True Then
- Me.Mouse.Image = My.Resources.zeldaleft
- ElseIf flip = False Then
- Me.Mouse.Image = My.Resources.zeldaright
- End If
- If flipv = 1 Then
- Me.Mouse.Image = My.Resources.zeldaup
- ElseIf flipv = 2 Then
- Me.Mouse.Image = My.Resources.zeldadown
- End If
- End If
- 'resets boolean var
- flipv = 0
- wlogic = False
- End While
- End Sub
- 'walls and cells---------------------------------------------------------------------------------------------
- 'wall toggle code
- Private Sub h_wall1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall1.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall2.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall3.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall4.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall5.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall6.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall7.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall8.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall9.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall10.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall11.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall12.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall13.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall14.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall15.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall16.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall17.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall18.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall19.Click
- Walledit(sender)
- End Sub
- Private Sub h_wall20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall20.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall1.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall2.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall3.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall4.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall5.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall6.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall7.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall8.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall9.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall10.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall11.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall12.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall13.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall14.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall15.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall16.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall17.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall18.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall19.Click
- Walledit(sender)
- End Sub
- Private Sub v_wall20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall20.Click
- Walledit(sender)
- End Sub
- 'mouse and goal placement code
- Private Sub cell1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell1.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 0
- locy = 0
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = -200
- g_locy = -300
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell2.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 100
- locy = 0
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = -100
- g_locy = -300
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell3.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 200
- locy = 0
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 0
- g_locy = -300
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell4.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 300
- locy = 0
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 100
- g_locy = -300
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell5.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 400
- locy = 0
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 200
- g_locy = -300
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell6.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 0
- locy = 100
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = -200
- g_locy = -200
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell7.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 100
- locy = 100
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = -100
- g_locy = -200
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell8.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 200
- locy = 100
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 0
- g_locy = -200
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell9.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 300
- locy = 100
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 100
- g_locy = -200
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell10.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 400
- locy = 100
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 200
- g_locy = -200
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell11.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 0
- locy = 200
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = -200
- g_locy = -100
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell12.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 100
- locy = 200
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = -100
- g_locy = -100
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell13.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 200
- locy = 200
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 0
- g_locy = -100
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell14.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 300
- locy = 200
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 100
- g_locy = -100
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell15.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 400
- locy = 200
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 200
- g_locy = -100
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell16.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 0
- locy = 300
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = -200
- g_locy = 0
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell17.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 100
- locy = 300
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = -100
- g_locy = 0
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell18.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 200
- locy = 300
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 0
- g_locy = 0
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell19.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 300
- locy = 300
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 100
- g_locy = 0
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell20.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 400
- locy = 300
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 200
- g_locy = 0
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell21.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 0
- locy = 400
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = -200
- g_locy = 100
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell22.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 100
- locy = 400
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = -100
- g_locy = 100
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell23_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell23.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 200
- locy = 400
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 0
- g_locy = 100
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell24.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 300
- locy = 400
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 100
- g_locy = 100
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- Private Sub cell25_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell25.Click
- If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
- locx = 400
- locy = 400
- 'MessageBox.Show(Me.Mouse.Left)
- Me.Mouse.Left = 40
- Me.Mouse.Top = 60
- Me.Mouse.Left = Me.Mouse.Left + locx
- Me.Mouse.Top = Me.Mouse.Top + locy
- cellToggle(toggle:="off")
- Mouse.Show()
- m_vis = True
- toolssetmouse.Checked = False
- End If
- If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
- g_locx = 200
- g_locy = 100
- Me.Goal.Left = 240
- Me.Goal.Top = 360
- Me.Goal.Left = Me.Goal.Left + g_locx
- Me.Goal.Top = Me.Goal.Top + g_locy
- cellToggle(toggle:="off")
- Goal.Show()
- g_vis = True
- toolssetgoal.Checked = False
- End If
- End Sub
- '_________________________________________________
- 'switches run button text from run to pause versa vice
- Private Sub Run_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Run.Click
- 'run option selected in file
- If runbutton = True Then
- Run.Text = "Pause" + vbNewLine + "| |"
- runbutton = False
- runpause.Checked = True
- ElseIf runbutton = False Then
- Run.Text = "Run"
- runbutton = True
- runpause.Checked = False
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment