Vulpes

vb_mouse

Apr 18th, 2011
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Main
  2.  
  3.     Dim x As Integer = 0 'move mouse x amount
  4.    Dim y As Integer = 0 ' move mouse y amount
  5.    Dim locx As Integer = 0 'actual mouse location x
  6.    Dim locy As Integer = 0 ' actual mouse location y
  7.  
  8.     Dim temploc As Integer = 0 ' to compare and verify moved
  9.    Dim cycle As Integer = 0 ' animation timer, not implemented yet
  10.    Dim flip As Boolean = False 'leftright orientation
  11.    Dim flipv As Integer = 0 'updown orientation
  12.  
  13.     Dim wlogic As Boolean = False 'main while loop for timer1
  14.    Dim editBox As Boolean = False ' edit walls
  15.    Dim editMouse As Boolean = False ' place mouse
  16.    Dim editGoal As Boolean = False ' place goal
  17.  
  18.     Dim mousemove1 As Boolean = False 'moved last turn, not implemented yet
  19.    Dim mazeFin As Integer = 0 ' found goal, not implemented yet
  20.    Dim m_vis As Boolean = True ' true if mouse is visible
  21.    Dim g_vis As Boolean = True ' true if goal is visible
  22.  
  23.     Dim g_locx As Integer = 240 ' actual location goal x
  24.    Dim g_locy As Integer = 360 ' actual location goal y
  25.    Dim trackx As Integer = 0 'track location check
  26.    Dim tracky As Integer = 0 'track location check
  27.  
  28.     Dim ncell As Integer = 1 ' has cell number
  29.    Dim gcell As Integer = 0 ' goal cell number
  30.    Dim lcell As Integer = 1 ' last cell mouse
  31.    Dim tracklogic As Boolean = False ' enable tracks
  32.  
  33.     Dim mousechar As Integer = 0 ' current mouse char 0 = simplemouse, 1 = car, 2 = zelda
  34.    Dim goalchar As Integer = 0 ' current cheese goal = 0, 1 = house, 2 = triforce, mousetrap = 3
  35.    Dim blooded As Boolean = False ' true if mouse has been clicked
  36.    Dim pool As Integer = 0
  37.  
  38.     Dim runbutton As Boolean = True ' logic to switch main run button from run to pause and back
  39.  
  40.  
  41.  
  42.     Private Sub Walledit(ByVal Sender As Object) 'toggles wall visibility, white to black
  43.        'Walledit(sender) to call in label_click event arg
  44.        If editBox = True Then
  45.  
  46.             If Sender.backcolor = Color.White Then
  47.                 Sender.backcolor = Color.Black
  48.  
  49.             ElseIf Sender.backcolor = Color.Black Then
  50.                 Sender.backcolor = Color.White
  51.             End If
  52.  
  53.         End If
  54.     End Sub
  55.  
  56.     Private Sub toolseditmaze_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolseditmaze.Click
  57.         If toolseditmaze.Checked = True Then
  58.             toolssetmouse.Enabled = True
  59.             toolssetgoal.Enabled = True
  60.             toolseditwalls.Enabled = True
  61.         ElseIf toolseditmaze.Checked = False Then
  62.             toolssetmouse.Enabled = False
  63.             toolssetgoal.Enabled = False
  64.             toolseditwalls.Enabled = False
  65.  
  66.         End If
  67.  
  68.     End Sub
  69.  
  70.  
  71.     Private Sub toolseditwalls_CheckState(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolseditwalls.CheckStateChanged
  72.         'edit maze menu option, same as edit box
  73.        If toolseditmaze.Checked = True Then
  74.  
  75.  
  76.             editBox = True
  77.  
  78.         ElseIf toolseditmaze.Checked = False Then
  79.             editBox = False
  80.  
  81.  
  82.         End If
  83.  
  84.  
  85.     End Sub
  86.  
  87.  
  88.     Private Sub filequit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles filequit.Click
  89.         Me.Close()  ' quit option in file menu
  90.    End Sub
  91.  
  92.  
  93.     Private Sub fileabout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles fileabout.Click
  94.         'about option in file menu
  95.        MessageBox.Show("MicroMouse Simulator 2011.  Created by: Blake Johnson, Johnathan Drake, William Rodgers")
  96.     End Sub
  97.  
  98.  
  99.     Private Sub toolssetmouse_CheckStateChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolssetmouse.CheckStateChanged
  100.  
  101.         If toolseditmaze.Checked = True Then
  102.  
  103.  
  104.             If toolssetmouse.Checked = True Then
  105.                 Mouse.Hide()
  106.                 m_vis = False
  107.                 editMouse = True
  108.                 cellInit()
  109.                 cellToggle(toggle:="on") ' turns cells visible
  110.  
  111.             ElseIf toolssetmouse.Checked = False Then
  112.                 editMouse = False
  113.                 cellToggle(toggle:="off") ' turns cells invisible
  114.                Mouse.Show()
  115.                 m_vis = True
  116.  
  117.             End If
  118.  
  119.         End If
  120.  
  121.  
  122.     End Sub
  123.  
  124.  
  125.     Private Sub toolssetgoal_CheckStateChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolssetgoal.CheckStateChanged
  126.         'MessageBox.Show("goal tool strip menu accessed")
  127.        If toolssetgoal.Checked = True Then
  128.             Goal.Hide()
  129.             g_vis = False
  130.             editGoal = True
  131.             cellInit()
  132.             cellToggle(toggle:="on") ' turns cells visible
  133.  
  134.         ElseIf toolssetgoal.Checked = False Then
  135.             Goal.Show()
  136.             editGoal = False
  137.             cellToggle(toggle:="off") ' turns cells invisible
  138.  
  139.             g_vis = True
  140.  
  141.  
  142.         End If
  143.     End Sub
  144.  
  145.  
  146.     Private Sub toolsenabletracks_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toolsenabletracks.CheckedChanged
  147.         If toolsenabletracks.Checked = True Then
  148.             tracklogic = True
  149.  
  150.         ElseIf toolsenabletracks.Checked = False Then
  151.             tracklogic = False
  152.  
  153.         End If
  154.         'MessageBox.Show(tracklogic)
  155.  
  156.     End Sub
  157.  
  158.     'zelda mouse option
  159.    Private Sub optionschangemousezelda_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optionschangemousezelda.Click
  160.  
  161.         mousechar = 2
  162.  
  163.         Me.Mouse.Image = MicroMouse.My.Resources.zeldadown
  164.  
  165.     End Sub
  166.  
  167.     Private Sub optionschangemousecar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optionschangemousecar.Click
  168.         mousechar = 1
  169.  
  170.         Me.Mouse.Image = MicroMouse.My.Resources.cardown
  171.  
  172.     End Sub
  173.  
  174.     Private Sub optionschangemousesimple_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optionschangemousesimple.Click
  175.         mousechar = 0
  176.  
  177.         Me.Mouse.Image = MicroMouse.My.Resources.teardropdown
  178.     End Sub
  179.  
  180.     Private Sub optionschangegoalcheese_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optionschangegoalcheese.Click
  181.  
  182.         goalchar = 0
  183.         Me.Goal.Image = MicroMouse.My.Resources.Cheese_icon
  184.  
  185.  
  186.     End Sub
  187.  
  188.     Private Sub optionschangegoalhouse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optionschangegoalhouse.Click
  189.  
  190.         goalchar = 1
  191.         Me.Goal.Image = MicroMouse.My.Resources.house
  192.  
  193.     End Sub
  194.  
  195.     Private Sub optionschangegoaltriforce_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optionschangegoaltriforce.Click
  196.  
  197.         goalchar = 2
  198.         Me.Goal.Image = MicroMouse.My.Resources.triforce
  199.  
  200.  
  201.     End Sub
  202.  
  203.     Private Sub optionschangegoalmousetrap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optionschangegoalmousetrap.Click
  204.         goalchar = 3
  205.         Me.Goal.Image = MicroMouse.My.Resources.Mousetrap
  206.     End Sub
  207.  
  208.     'smack down option
  209.    Private Sub Mouse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Mouse.Click
  210.         blooded = True
  211.  
  212.         If ncell = 1 Then
  213.             pool = 1
  214.             cell1.Image = My.Resources.bloodprint
  215.  
  216.         End If
  217.         '...for every other cell 2 - 25
  218.    End Sub
  219.  
  220.  
  221.     Private Sub cellInit() 'returns cell boxes to default backcolor
  222.  
  223.         cell1.BackColor = Color.Gainsboro
  224.         cell2.BackColor = Color.Gainsboro
  225.         cell3.BackColor = Color.Gainsboro
  226.         cell4.BackColor = Color.Gainsboro
  227.         cell5.BackColor = Color.Gainsboro
  228.         cell6.BackColor = Color.Gainsboro
  229.         cell7.BackColor = Color.Gainsboro
  230.         cell8.BackColor = Color.Gainsboro
  231.         cell9.BackColor = Color.Gainsboro
  232.         cell10.BackColor = Color.Gainsboro
  233.         cell11.BackColor = Color.Gainsboro
  234.         cell12.BackColor = Color.Gainsboro
  235.         cell13.BackColor = Color.Gainsboro
  236.         cell14.BackColor = Color.Gainsboro
  237.         cell15.BackColor = Color.Gainsboro
  238.         cell16.BackColor = Color.Gainsboro
  239.         cell17.BackColor = Color.Gainsboro
  240.         cell18.BackColor = Color.Gainsboro
  241.         cell19.BackColor = Color.Gainsboro
  242.         cell20.BackColor = Color.Gainsboro
  243.         cell21.BackColor = Color.Gainsboro
  244.         cell22.BackColor = Color.Gainsboro
  245.         cell23.BackColor = Color.Gainsboro
  246.         cell24.BackColor = Color.Gainsboro
  247.         cell25.BackColor = Color.Gainsboro
  248.  
  249.  
  250.  
  251.     End Sub
  252.  
  253.     Private Sub cellToggle(ByVal toggle As String) 'toggles cell boxes, String toggle on/off
  254.  
  255.         If toggle = "on" Then
  256.             cell1.Visible = True
  257.             cell2.Visible = True
  258.             cell3.Visible = True
  259.             cell4.Visible = True
  260.             cell5.Visible = True
  261.             cell6.Visible = True
  262.             cell7.Visible = True
  263.             cell8.Visible = True
  264.             cell9.Visible = True
  265.             cell10.Visible = True
  266.             cell11.Visible = True
  267.             cell12.Visible = True
  268.             cell13.Visible = True
  269.             cell14.Visible = True
  270.             cell15.Visible = True
  271.             cell16.Visible = True
  272.             cell17.Visible = True
  273.             cell18.Visible = True
  274.             cell19.Visible = True
  275.             cell20.Visible = True
  276.             cell21.Visible = True
  277.             cell22.Visible = True
  278.             cell23.Visible = True
  279.             cell24.Visible = True
  280.             cell25.Visible = True
  281.  
  282.         ElseIf toggle = "off" Then
  283.             cell1.Visible = False
  284.             cell2.Visible = False
  285.             cell3.Visible = False
  286.             cell4.Visible = False
  287.             cell5.Visible = False
  288.             cell6.Visible = False
  289.             cell7.Visible = False
  290.             cell8.Visible = False
  291.             cell9.Visible = False
  292.             cell10.Visible = False
  293.             cell11.Visible = False
  294.             cell12.Visible = False
  295.             cell13.Visible = False
  296.             cell14.Visible = False
  297.             cell15.Visible = False
  298.             cell16.Visible = False
  299.             cell17.Visible = False
  300.             cell18.Visible = False
  301.             cell19.Visible = False
  302.             cell20.Visible = False
  303.             cell21.Visible = False
  304.             cell22.Visible = False
  305.             cell23.Visible = False
  306.             cell24.Visible = False
  307.             cell25.Visible = False
  308.         End If
  309.  
  310.     End Sub
  311.  
  312.  
  313.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  314.  
  315.         'showdata button
  316.        ' infobox2.Text = "Mouse Location: " + "( " + Mouse.Left.ToString + ", " + Mouse.Top.ToString + ")" + vbNewLine + "Cell:" + ncell.ToString
  317.        ' ncell = findCell(locx, locy)
  318.  
  319.     End Sub
  320.  
  321.  
  322.     'reset maze option
  323.  
  324.  
  325.  
  326.     'key input event------------------------------------------------
  327.    Private Sub Main_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
  328.  
  329.         If runmanualmove.Checked = True Then
  330.             'keydown event move mouse with keyboard asdw
  331.  
  332.             If e.KeyCode = Keys.D Then 'move right
  333.                flipv = 0
  334.  
  335.                 If locx <= 300 Then
  336.                     x = 100
  337.                     temploc = locx
  338.                     locx = locx + x
  339.  
  340.                 End If
  341.                 If temploc > locx Or temploc < locx Then
  342.                     mousemove1 = True
  343.                 End If
  344.  
  345.                 wlogic = True
  346.                 flip = False
  347.  
  348.             ElseIf e.KeyCode = Keys.A Then 'move left
  349.                flipv = 0
  350.  
  351.                 If locx >= 100 Then
  352.                     x = -100
  353.                     temploc = locx
  354.                     locx = locx + x
  355.                 End If
  356.                 If temploc > locx Or temploc < locx Then
  357.                     mousemove1 = True
  358.                 End If
  359.                 flip = True
  360.                 wlogic = True
  361.  
  362.             ElseIf e.KeyCode = Keys.W Then 'move up
  363.                flipv = 1
  364.  
  365.                 If locy >= 100 Then
  366.                     y = -100
  367.                     temploc = locy
  368.                     locy = locy + y
  369.                 End If
  370.                 If temploc > locy Or temploc < locy Then
  371.                     mousemove1 = True
  372.                 End If
  373.  
  374.  
  375.                 wlogic = True
  376.  
  377.             ElseIf e.KeyCode = Keys.S Then 'move down
  378.                flipv = 2
  379.  
  380.                 If locy <= 300 Then
  381.                     y = 100
  382.                     temploc = locy
  383.                     locy = locy + y
  384.                 End If
  385.                 If temploc > locy Or temploc < locy Then
  386.                     mousemove1 = True
  387.                 End If
  388.  
  389.                 wlogic = True
  390.  
  391.             End If
  392.         End If
  393.  
  394.     End Sub
  395.  
  396.  
  397.     Private Sub trackMaker(ByVal ncell As Integer, ByVal lcell As Integer) 'makes footprints appear in last cell visited
  398.  
  399.  
  400.  
  401.         If ncell = 1 Then
  402.  
  403.             cell1.BackColor = Color.PaleGreen
  404.             cell1.Visible = False
  405.             'MessageBox.Show(Mouse.Visible.ToString)
  406.  
  407.         End If
  408.  
  409.  
  410.         If lcell = 1 And ncell <> 1 And blooded = True Then
  411.             If mousechar = 0 Then
  412.                 If flip = False And flipv = 0 Then
  413.  
  414.                     If pool <> 1 Then  '  some kind of blood spot saver variable
  415.                        cell1.Image = My.Resources.printrightb
  416.                     End If
  417.  
  418.  
  419.                 ElseIf flip = True And flipv = 0 Then
  420.  
  421.                     If pool <> 1 Then
  422.                         cell1.Image = My.Resources.printleftb
  423.                     End If
  424.  
  425.                 ElseIf flipv = 1 Then
  426.  
  427.                     If pool <> 1 Then
  428.                         cell1.Image = My.Resources.printupb
  429.                     End If
  430.  
  431.                 ElseIf flipv = 2 Then
  432.                     If pool <> 1 Then
  433.                         cell1.Image = My.Resources.printdownb
  434.                     End If
  435.  
  436.                     End If
  437.  
  438.  
  439.  
  440.                 ElseIf mousechar = 1 Then
  441.  
  442.                     If flip = False And flipv = 0 Then
  443.                         cell1.Image = My.Resources.tireright
  444.  
  445.                     ElseIf flip = True And flipv = 0 Then
  446.                         cell1.Image = My.Resources.tireleft
  447.  
  448.                     ElseIf flipv = 1 Then
  449.                         cell1.Image = My.Resources.tireup
  450.                     ElseIf flipv = 2 Then
  451.                         cell1.Image = My.Resources.tiredown
  452.  
  453.                     End If
  454.  
  455.  
  456.  
  457.                 ElseIf mousechar = 2 Then
  458.  
  459.                     If flip = False And flipv = 0 Then
  460.                         cell1.Image = My.Resources.bootprintright
  461.  
  462.                     ElseIf flip = True And flipv = 0 Then
  463.                         cell1.Image = My.Resources.bootprintleft
  464.  
  465.                     ElseIf flipv = 1 Then
  466.                         cell1.Image = My.Resources.bootprintup
  467.                     ElseIf flipv = 2 Then
  468.                         cell1.Image = My.Resources.bootprintdown
  469.  
  470.                     End If
  471.                 End If
  472.  
  473.  
  474.  
  475.  
  476.             End If
  477.  
  478.  
  479.         If lcell = 1 And ncell <> 1 And blooded = False Then
  480.  
  481.             If mousechar = 0 Then
  482.                 If flip = False And flipv = 0 Then
  483.                     cell1.Image = My.Resources.printright
  484.  
  485.                 ElseIf flip = True And flipv = 0 Then
  486.                     cell1.Image = My.Resources.printleft
  487.  
  488.                 ElseIf flipv = 1 Then
  489.                     cell1.Image = My.Resources.printup
  490.                 ElseIf flipv = 2 Then
  491.                     cell1.Image = My.Resources.printdown
  492.  
  493.                 End If
  494.  
  495.  
  496.  
  497.             ElseIf mousechar = 1 Then
  498.  
  499.                 If flip = False And flipv = 0 Then
  500.                     cell1.Image = My.Resources.tireright
  501.  
  502.                 ElseIf flip = True And flipv = 0 Then
  503.                     cell1.Image = My.Resources.tireleft
  504.  
  505.                 ElseIf flipv = 1 Then
  506.                     cell1.Image = My.Resources.tireup
  507.                 ElseIf flipv = 2 Then
  508.                     cell1.Image = My.Resources.tiredown
  509.  
  510.                 End If
  511.  
  512.  
  513.  
  514.             ElseIf mousechar = 2 Then
  515.  
  516.                 If flip = False And flipv = 0 Then
  517.                     cell1.Image = My.Resources.bootprintright
  518.  
  519.                 ElseIf flip = True And flipv = 0 Then
  520.                     cell1.Image = My.Resources.bootprintleft
  521.  
  522.                 ElseIf flipv = 1 Then
  523.                     cell1.Image = My.Resources.bootprintup
  524.                 ElseIf flipv = 2 Then
  525.                     cell1.Image = My.Resources.bootprintdown
  526.  
  527.                 End If
  528.             End If
  529.         End If
  530.  
  531.  
  532.  
  533.         cell1.BackColor = Color.White
  534.         cell1.Show()
  535.  
  536.  
  537.  
  538.  
  539.         If ncell = 2 Then
  540.  
  541.             cell2.BackColor = Color.PaleGreen
  542.             cell2.Visible = False
  543.         End If
  544.  
  545.         If lcell = 2 And ncell <> 2 Then
  546.  
  547.             If flip = False And flipv = 0 Then
  548.                 cell2.Image = My.Resources.printright
  549.  
  550.             ElseIf flip = True And flipv = 0 Then
  551.                 cell2.Image = My.Resources.printleft
  552.  
  553.             ElseIf flipv = 1 Then
  554.                 cell2.Image = My.Resources.printup
  555.             ElseIf flipv = 2 Then
  556.                 cell2.Image = My.Resources.printdown
  557.  
  558.             End If
  559.  
  560.             cell2.BackColor = Color.White
  561.             cell2.Show()
  562.  
  563.         End If
  564.  
  565.         If ncell = 3 Then
  566.  
  567.             cell3.BackColor = Color.PaleGreen
  568.             cell3.Visible = False
  569.         End If
  570.  
  571.         If lcell = 3 And ncell <> 3 Then
  572.  
  573.             If flip = False And flipv = 0 Then
  574.                 cell3.Image = My.Resources.printright
  575.  
  576.             ElseIf flip = True And flipv = 0 Then
  577.                 cell3.Image = My.Resources.printleft
  578.  
  579.             ElseIf flipv = 1 Then
  580.                 cell3.Image = My.Resources.printup
  581.             ElseIf flipv = 2 Then
  582.                 cell3.Image = My.Resources.printdown
  583.  
  584.             End If
  585.  
  586.             cell3.BackColor = Color.White
  587.             cell3.Show()
  588.  
  589.         End If
  590.  
  591.         If ncell = 4 Then
  592.  
  593.             cell4.BackColor = Color.PaleGreen
  594.             cell4.Visible = False
  595.         End If
  596.  
  597.         If lcell = 4 And ncell <> 4 Then
  598.  
  599.             If flip = False And flipv = 0 Then
  600.                 cell4.Image = My.Resources.printright
  601.  
  602.             ElseIf flip = True And flipv = 0 Then
  603.                 cell4.Image = My.Resources.printleft
  604.  
  605.             ElseIf flipv = 1 Then
  606.                 cell4.Image = My.Resources.printup
  607.             ElseIf flipv = 2 Then
  608.                 cell4.Image = My.Resources.printdown
  609.  
  610.             End If
  611.  
  612.             cell4.BackColor = Color.White
  613.             cell4.Show()
  614.  
  615.         End If
  616.  
  617.         If ncell = 5 Then
  618.  
  619.             cell5.BackColor = Color.PaleGreen
  620.             cell5.Visible = False
  621.         End If
  622.  
  623.         If lcell = 5 And ncell <> 5 Then
  624.  
  625.             If flip = False And flipv = 0 Then
  626.                 cell5.Image = My.Resources.printright
  627.  
  628.             ElseIf flip = True And flipv = 0 Then
  629.                 cell5.Image = My.Resources.printleft
  630.  
  631.             ElseIf flipv = 5 Then
  632.                 cell5.Image = My.Resources.printup
  633.             ElseIf flipv = 2 Then
  634.                 cell5.Image = My.Resources.printdown
  635.  
  636.             End If
  637.  
  638.             cell5.BackColor = Color.White
  639.             cell5.Show()
  640.  
  641.         End If
  642.  
  643.         If ncell = 6 Then
  644.  
  645.             cell6.BackColor = Color.PaleGreen
  646.             cell6.Visible = False
  647.         End If
  648.  
  649.         If lcell = 6 And ncell <> 6 Then
  650.  
  651.             If flip = False And flipv = 0 Then
  652.                 cell6.Image = My.Resources.printright
  653.  
  654.             ElseIf flip = True And flipv = 0 Then
  655.                 cell6.Image = My.Resources.printleft
  656.  
  657.             ElseIf flipv = 1 Then
  658.                 cell6.Image = My.Resources.printup
  659.             ElseIf flipv = 2 Then
  660.                 cell6.Image = My.Resources.printdown
  661.  
  662.             End If
  663.  
  664.             cell6.BackColor = Color.White
  665.             cell6.Show()
  666.  
  667.         End If
  668.  
  669.  
  670.         If ncell = 7 Then
  671.  
  672.             cell7.BackColor = Color.PaleGreen
  673.             cell7.Visible = False
  674.         End If
  675.  
  676.         If lcell = 7 And ncell <> 7 Then
  677.  
  678.             If flip = False And flipv = 0 Then
  679.                 cell7.Image = My.Resources.printright
  680.  
  681.             ElseIf flip = True And flipv = 0 Then
  682.                 cell7.Image = My.Resources.printleft
  683.  
  684.             ElseIf flipv = 1 Then
  685.                 cell7.Image = My.Resources.printup
  686.             ElseIf flipv = 2 Then
  687.                 cell7.Image = My.Resources.printdown
  688.  
  689.             End If
  690.  
  691.             cell7.BackColor = Color.White
  692.             cell7.Show()
  693.  
  694.         End If
  695.  
  696.         If ncell = 8 Then
  697.  
  698.             cell8.BackColor = Color.PaleGreen
  699.             cell8.Visible = False
  700.         End If
  701.  
  702.         If lcell = 8 And ncell <> 8 Then
  703.  
  704.             If flip = False And flipv = 0 Then
  705.                 cell8.Image = My.Resources.printright
  706.  
  707.             ElseIf flip = True And flipv = 0 Then
  708.                 cell8.Image = My.Resources.printleft
  709.  
  710.             ElseIf flipv = 1 Then
  711.                 cell8.Image = My.Resources.printup
  712.             ElseIf flipv = 2 Then
  713.                 cell8.Image = My.Resources.printdown
  714.  
  715.             End If
  716.  
  717.             cell8.BackColor = Color.White
  718.             cell8.Show()
  719.  
  720.         End If
  721.  
  722.         If ncell = 9 Then
  723.  
  724.             cell9.BackColor = Color.PaleGreen
  725.             cell9.Visible = False
  726.         End If
  727.  
  728.         If lcell = 9 And ncell <> 9 Then
  729.  
  730.             If flip = False And flipv = 0 Then
  731.                 cell9.Image = My.Resources.printright
  732.  
  733.             ElseIf flip = True And flipv = 0 Then
  734.                 cell9.Image = My.Resources.printleft
  735.  
  736.             ElseIf flipv = 1 Then
  737.                 cell9.Image = My.Resources.printup
  738.             ElseIf flipv = 2 Then
  739.                 cell9.Image = My.Resources.printdown
  740.  
  741.             End If
  742.  
  743.             cell9.BackColor = Color.White
  744.             cell9.Show()
  745.  
  746.         End If
  747.  
  748.         If ncell = 10 Then
  749.  
  750.             cell10.BackColor = Color.PaleGreen
  751.             cell10.Visible = False
  752.         End If
  753.  
  754.         If lcell = 10 And ncell <> 10 Then
  755.  
  756.             If flip = False And flipv = 0 Then
  757.                 cell10.Image = My.Resources.printright
  758.  
  759.             ElseIf flip = True And flipv = 0 Then
  760.                 cell10.Image = My.Resources.printleft
  761.  
  762.             ElseIf flipv = 1 Then
  763.                 cell10.Image = My.Resources.printup
  764.             ElseIf flipv = 2 Then
  765.                 cell10.Image = My.Resources.printdown
  766.  
  767.             End If
  768.  
  769.             cell10.BackColor = Color.White
  770.             cell10.Show()
  771.  
  772.         End If
  773.  
  774.         If ncell = 11 Then
  775.  
  776.             cell11.BackColor = Color.PaleGreen
  777.             cell11.Visible = False
  778.         End If
  779.  
  780.         If lcell = 11 And ncell <> 11 Then
  781.  
  782.             If flip = False And flipv = 0 Then
  783.                 cell11.Image = My.Resources.printright
  784.  
  785.             ElseIf flip = True And flipv = 0 Then
  786.                 cell11.Image = My.Resources.printleft
  787.  
  788.             ElseIf flipv = 1 Then
  789.                 cell11.Image = My.Resources.printup
  790.             ElseIf flipv = 2 Then
  791.                 cell11.Image = My.Resources.printdown
  792.  
  793.             End If
  794.  
  795.             cell11.BackColor = Color.White
  796.             cell11.Show()
  797.  
  798.         End If
  799.  
  800.         If ncell = 12 Then
  801.  
  802.             cell12.BackColor = Color.PaleGreen
  803.             cell12.Visible = False
  804.         End If
  805.  
  806.         If lcell = 12 And ncell <> 12 Then
  807.  
  808.             If flip = False And flipv = 0 Then
  809.                 cell12.Image = My.Resources.printright
  810.  
  811.             ElseIf flip = True And flipv = 0 Then
  812.                 cell12.Image = My.Resources.printleft
  813.  
  814.             ElseIf flipv = 1 Then
  815.                 cell12.Image = My.Resources.printup
  816.             ElseIf flipv = 2 Then
  817.                 cell12.Image = My.Resources.printdown
  818.  
  819.             End If
  820.  
  821.             cell12.BackColor = Color.White
  822.             cell12.Show()
  823.  
  824.         End If
  825.  
  826.         If ncell = 13 Then
  827.  
  828.             cell13.BackColor = Color.PaleGreen
  829.             cell13.Visible = False
  830.         End If
  831.  
  832.         If lcell = 13 And ncell <> 13 Then
  833.  
  834.             If flip = False And flipv = 0 Then
  835.                 cell13.Image = My.Resources.printright
  836.  
  837.             ElseIf flip = True And flipv = 0 Then
  838.                 cell13.Image = My.Resources.printleft
  839.  
  840.             ElseIf flipv = 1 Then
  841.                 cell13.Image = My.Resources.printup
  842.             ElseIf flipv = 2 Then
  843.                 cell13.Image = My.Resources.printdown
  844.  
  845.             End If
  846.  
  847.             cell13.BackColor = Color.White
  848.             cell13.Show()
  849.  
  850.         End If
  851.  
  852.         If ncell = 14 Then
  853.  
  854.             cell14.BackColor = Color.PaleGreen
  855.             cell14.Visible = False
  856.         End If
  857.  
  858.         If lcell = 14 And ncell <> 14 Then
  859.  
  860.             If flip = False And flipv = 0 Then
  861.                 cell14.Image = My.Resources.printright
  862.  
  863.             ElseIf flip = True And flipv = 0 Then
  864.                 cell14.Image = My.Resources.printleft
  865.  
  866.             ElseIf flipv = 1 Then
  867.                 cell14.Image = My.Resources.printup
  868.             ElseIf flipv = 2 Then
  869.                 cell14.Image = My.Resources.printdown
  870.  
  871.             End If
  872.  
  873.             cell14.BackColor = Color.White
  874.             cell14.Show()
  875.  
  876.         End If
  877.  
  878.         If ncell = 15 Then
  879.  
  880.             cell15.BackColor = Color.PaleGreen
  881.             cell15.Visible = False
  882.         End If
  883.  
  884.         If lcell = 15 And ncell <> 15 Then
  885.  
  886.             If flip = False And flipv = 0 Then
  887.                 cell15.Image = My.Resources.printright
  888.  
  889.             ElseIf flip = True And flipv = 0 Then
  890.                 cell15.Image = My.Resources.printleft
  891.  
  892.             ElseIf flipv = 1 Then
  893.                 cell15.Image = My.Resources.printup
  894.             ElseIf flipv = 2 Then
  895.                 cell15.Image = My.Resources.printdown
  896.  
  897.             End If
  898.  
  899.             cell15.BackColor = Color.White
  900.             cell15.Show()
  901.  
  902.         End If
  903.  
  904.         If ncell = 16 Then
  905.  
  906.             cell16.BackColor = Color.PaleGreen
  907.             cell16.Visible = False
  908.         End If
  909.  
  910.         If lcell = 16 And ncell <> 16 Then
  911.  
  912.             If flip = False And flipv = 0 Then
  913.                 cell16.Image = My.Resources.printright
  914.  
  915.             ElseIf flip = True And flipv = 0 Then
  916.                 cell16.Image = My.Resources.printleft
  917.  
  918.             ElseIf flipv = 1 Then
  919.                 cell16.Image = My.Resources.printup
  920.             ElseIf flipv = 2 Then
  921.                 cell16.Image = My.Resources.printdown
  922.  
  923.             End If
  924.  
  925.             cell16.BackColor = Color.White
  926.             cell16.Show()
  927.  
  928.         End If
  929.  
  930.         If ncell = 17 Then
  931.  
  932.             cell17.BackColor = Color.PaleGreen
  933.             cell17.Visible = False
  934.         End If
  935.  
  936.         If lcell = 17 And ncell <> 17 Then
  937.  
  938.             If flip = False And flipv = 0 Then
  939.                 cell17.Image = My.Resources.printright
  940.  
  941.             ElseIf flip = True And flipv = 0 Then
  942.                 cell17.Image = My.Resources.printleft
  943.  
  944.             ElseIf flipv = 1 Then
  945.                 cell17.Image = My.Resources.printup
  946.             ElseIf flipv = 2 Then
  947.                 cell17.Image = My.Resources.printdown
  948.  
  949.             End If
  950.  
  951.             cell17.BackColor = Color.White
  952.             cell17.Show()
  953.  
  954.         End If
  955.  
  956.         If ncell = 18 Then
  957.  
  958.             cell18.BackColor = Color.PaleGreen
  959.             cell18.Visible = False
  960.         End If
  961.  
  962.         If lcell = 18 And ncell <> 18 Then
  963.  
  964.             If flip = False And flipv = 0 Then
  965.                 cell18.Image = My.Resources.printright
  966.  
  967.             ElseIf flip = True And flipv = 0 Then
  968.                 cell18.Image = My.Resources.printleft
  969.  
  970.             ElseIf flipv = 1 Then
  971.                 cell18.Image = My.Resources.printup
  972.             ElseIf flipv = 2 Then
  973.                 cell18.Image = My.Resources.printdown
  974.  
  975.             End If
  976.  
  977.             cell18.BackColor = Color.White
  978.             cell18.Show()
  979.  
  980.         End If
  981.  
  982.         If ncell = 19 Then
  983.  
  984.             cell19.BackColor = Color.PaleGreen
  985.             cell19.Visible = False
  986.         End If
  987.  
  988.         If lcell = 19 And ncell <> 19 Then
  989.  
  990.             If flip = False And flipv = 0 Then
  991.                 cell19.Image = My.Resources.printright
  992.  
  993.             ElseIf flip = True And flipv = 0 Then
  994.                 cell19.Image = My.Resources.printleft
  995.  
  996.             ElseIf flipv = 1 Then
  997.                 cell19.Image = My.Resources.printup
  998.             ElseIf flipv = 2 Then
  999.                 cell19.Image = My.Resources.printdown
  1000.  
  1001.             End If
  1002.  
  1003.             cell19.BackColor = Color.White
  1004.             cell19.Show()
  1005.  
  1006.         End If
  1007.  
  1008.         If ncell = 20 Then
  1009.  
  1010.             cell20.BackColor = Color.PaleGreen
  1011.             cell20.Visible = False
  1012.         End If
  1013.  
  1014.         If lcell = 20 And ncell <> 20 Then
  1015.  
  1016.             If flip = False And flipv = 0 Then
  1017.                 cell20.Image = My.Resources.printright
  1018.  
  1019.             ElseIf flip = True And flipv = 0 Then
  1020.                 cell20.Image = My.Resources.printleft
  1021.  
  1022.             ElseIf flipv = 1 Then
  1023.                 cell20.Image = My.Resources.printup
  1024.             ElseIf flipv = 2 Then
  1025.                 cell20.Image = My.Resources.printdown
  1026.  
  1027.             End If
  1028.  
  1029.             cell20.BackColor = Color.White
  1030.             cell20.Show()
  1031.  
  1032.         End If
  1033.  
  1034.         If ncell = 21 Then
  1035.  
  1036.             cell21.BackColor = Color.PaleGreen
  1037.             cell21.Visible = False
  1038.         End If
  1039.  
  1040.         If lcell = 21 And ncell <> 21 Then
  1041.  
  1042.             If flip = False And flipv = 0 Then
  1043.                 cell21.Image = My.Resources.printright
  1044.  
  1045.             ElseIf flip = True And flipv = 0 Then
  1046.                 cell21.Image = My.Resources.printleft
  1047.  
  1048.             ElseIf flipv = 1 Then
  1049.                 cell21.Image = My.Resources.printup
  1050.             ElseIf flipv = 2 Then
  1051.                 cell21.Image = My.Resources.printdown
  1052.  
  1053.             End If
  1054.  
  1055.             cell21.BackColor = Color.White
  1056.             cell21.Show()
  1057.  
  1058.         End If
  1059.  
  1060.         If ncell = 22 Then
  1061.  
  1062.             cell22.BackColor = Color.PaleGreen
  1063.             cell22.Visible = False
  1064.         End If
  1065.  
  1066.         If lcell = 22 And ncell <> 22 Then
  1067.  
  1068.             If flip = False And flipv = 0 Then
  1069.                 cell22.Image = My.Resources.printright
  1070.  
  1071.             ElseIf flip = True And flipv = 0 Then
  1072.                 cell22.Image = My.Resources.printleft
  1073.  
  1074.             ElseIf flipv = 1 Then
  1075.                 cell22.Image = My.Resources.printup
  1076.             ElseIf flipv = 2 Then
  1077.                 cell22.Image = My.Resources.printdown
  1078.  
  1079.             End If
  1080.  
  1081.             cell22.BackColor = Color.White
  1082.             cell22.Show()
  1083.  
  1084.         End If
  1085.  
  1086.         If ncell = 23 Then
  1087.  
  1088.             cell23.BackColor = Color.PaleGreen
  1089.             cell23.Visible = False
  1090.         End If
  1091.  
  1092.         If lcell = 23 And ncell <> 23 Then
  1093.  
  1094.             If flip = False And flipv = 0 Then
  1095.                 cell23.Image = My.Resources.printright
  1096.  
  1097.             ElseIf flip = True And flipv = 0 Then
  1098.                 cell23.Image = My.Resources.printleft
  1099.  
  1100.             ElseIf flipv = 1 Then
  1101.                 cell23.Image = My.Resources.printup
  1102.             ElseIf flipv = 2 Then
  1103.                 cell23.Image = My.Resources.printdown
  1104.  
  1105.             End If
  1106.  
  1107.             cell23.BackColor = Color.White
  1108.             cell23.Show()
  1109.  
  1110.         End If
  1111.  
  1112.         If ncell = 24 Then
  1113.  
  1114.             cell24.BackColor = Color.PaleGreen
  1115.             cell24.Visible = False
  1116.         End If
  1117.  
  1118.         If lcell = 24 And ncell <> 24 Then
  1119.  
  1120.             If flip = False And flipv = 0 Then
  1121.                 cell24.Image = My.Resources.printright
  1122.  
  1123.             ElseIf flip = True And flipv = 0 Then
  1124.                 cell24.Image = My.Resources.printleft
  1125.  
  1126.             ElseIf flipv = 1 Then
  1127.                 cell24.Image = My.Resources.printup
  1128.             ElseIf flipv = 2 Then
  1129.                 cell24.Image = My.Resources.printdown
  1130.  
  1131.             End If
  1132.  
  1133.             cell24.BackColor = Color.White
  1134.             cell24.Show()
  1135.  
  1136.         End If
  1137.  
  1138.         If ncell = 25 Then
  1139.  
  1140.             cell25.BackColor = Color.PaleGreen
  1141.             cell25.Visible = False
  1142.         End If
  1143.  
  1144.         If lcell = 25 And ncell <> 25 Then
  1145.  
  1146.             If flip = False And flipv = 0 Then
  1147.                 cell25.Image = My.Resources.printright
  1148.  
  1149.             ElseIf flip = True And flipv = 0 Then
  1150.                 cell25.Image = My.Resources.printleft
  1151.  
  1152.             ElseIf flipv = 1 Then
  1153.                 cell25.Image = My.Resources.printup
  1154.             ElseIf flipv = 2 Then
  1155.                 cell25.Image = My.Resources.printdown
  1156.  
  1157.             End If
  1158.  
  1159.             cell25.BackColor = Color.White
  1160.             cell25.Show()
  1161.  
  1162.         End If
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.     End Sub
  1169.  
  1170.  
  1171.     Private Function findCell(ByVal x As Integer, ByVal y As Integer) As Integer 'finds mouse current cell
  1172.        Dim cell As Integer = 0
  1173.  
  1174.         If x = 0 And y = 0 Then
  1175.             cell = 1
  1176.  
  1177.         ElseIf x = 100 And y = 0 Then
  1178.             cell = 2
  1179.  
  1180.         ElseIf x = 200 And y = 0 Then
  1181.             cell = 3
  1182.  
  1183.         ElseIf x = 300 And y = 0 Then
  1184.             cell = 4
  1185.  
  1186.         ElseIf x = 400 And y = 0 Then
  1187.             cell = 5
  1188.  
  1189.         ElseIf x = 0 And y = 100 Then
  1190.             cell = 6
  1191.  
  1192.         ElseIf x = 100 And y = 100 Then
  1193.             cell = 7
  1194.  
  1195.         ElseIf x = 200 And y = 100 Then
  1196.             cell = 8
  1197.  
  1198.         ElseIf x = 300 And y = 100 Then
  1199.             cell = 9
  1200.  
  1201.         ElseIf x = 400 And y = 100 Then
  1202.             cell = 10
  1203.  
  1204.         ElseIf x = 0 And y = 200 Then
  1205.             cell = 11
  1206.  
  1207.         ElseIf x = 100 And y = 200 Then
  1208.             cell = 12
  1209.  
  1210.         ElseIf x = 200 And y = 200 Then
  1211.             cell = 13
  1212.  
  1213.         ElseIf x = 300 And y = 200 Then
  1214.             cell = 14
  1215.  
  1216.         ElseIf x = 400 And y = 200 Then
  1217.             cell = 15
  1218.  
  1219.         ElseIf x = 0 And y = 300 Then
  1220.             cell = 16
  1221.  
  1222.         ElseIf x = 100 And y = 300 Then
  1223.             cell = 17
  1224.  
  1225.         ElseIf x = 200 And y = 300 Then
  1226.             cell = 18
  1227.  
  1228.         ElseIf x = 300 And y = 300 Then
  1229.             cell = 19
  1230.  
  1231.         ElseIf x = 400 And y = 300 Then
  1232.             cell = 20
  1233.  
  1234.         ElseIf x = 0 And y = 400 Then
  1235.             cell = 21
  1236.  
  1237.         ElseIf x = 100 And y = 400 Then
  1238.             cell = 22
  1239.  
  1240.         ElseIf x = 200 And y = 400 Then
  1241.             cell = 23
  1242.  
  1243.         ElseIf x = 300 And y = 400 Then
  1244.             cell = 24
  1245.  
  1246.         ElseIf x = 400 And y = 400 Then
  1247.             cell = 25
  1248.         End If
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.         Return cell
  1255.  
  1256.  
  1257.  
  1258.     End Function
  1259.  
  1260.  
  1261.  
  1262.  
  1263.     'main timer event------------------------------------------------main while loop
  1264.    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  1265.  
  1266.  
  1267.         'textbox data
  1268.        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 + ")"
  1269.         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 + ")"
  1270.         infobox3.Text = "Walledit: " + editBox.ToString + vbNewLine + "Tracks: " + tracklogic.ToString + vbNewLine + "SetMouse: " + editMouse.ToString + vbNewLine + "SetGoal: " + editGoal.ToString
  1271.  
  1272.         While wlogic = True
  1273.             'moves the mouse relative to top left corner
  1274.  
  1275.  
  1276.  
  1277.             While mousemove1 = True
  1278.  
  1279.                 lcell = ncell 'last cell mouse was in
  1280.                ncell = findCell(locx, locy)
  1281.                 gcell = findCell(g_locx, g_locy)
  1282.  
  1283.  
  1284.                 Me.Mouse.Left = Me.Mouse.Left + x
  1285.                 Me.Mouse.Top = Me.Mouse.Top + y
  1286.  
  1287.  
  1288.                 If tracklogic = True Then
  1289.                     trackMaker(ncell, lcell)
  1290.                 End If
  1291.  
  1292.  
  1293.                
  1294.                 'resets move x, y
  1295.                x = 0
  1296.                 y = 0
  1297.  
  1298.  
  1299.  
  1300.                 mousemove1 = False
  1301.             End While
  1302.  
  1303.  
  1304.             'changes the image and orientation ' current mouse char 0 = simplemouse, 1 = car, 2 = zelda
  1305.            If mousechar = 0 Then
  1306.                 If flip = True Then
  1307.                     Me.Mouse.Image = My.Resources.teardropleft
  1308.  
  1309.                 ElseIf flip = False Then
  1310.                     Me.Mouse.Image = My.Resources.teardropright
  1311.  
  1312.                 End If
  1313.  
  1314.                 If flipv = 1 Then
  1315.                     Me.Mouse.Image = My.Resources.teardropup
  1316.  
  1317.                 ElseIf flipv = 2 Then
  1318.                     Me.Mouse.Image = My.Resources.teardropdown
  1319.  
  1320.                 End If
  1321.  
  1322.             End If
  1323.  
  1324.             If mousechar = 1 Then
  1325.                 If flip = True Then
  1326.                     Me.Mouse.Image = My.Resources.carleft
  1327.  
  1328.                 ElseIf flip = False Then
  1329.                     Me.Mouse.Image = My.Resources.car
  1330.  
  1331.                 End If
  1332.  
  1333.                 If flipv = 1 Then
  1334.                     Me.Mouse.Image = My.Resources.carup
  1335.  
  1336.                 ElseIf flipv = 2 Then
  1337.                     Me.Mouse.Image = My.Resources.cardown
  1338.  
  1339.                 End If
  1340.             End If
  1341.  
  1342.             If mousechar = 2 Then
  1343.                 If flip = True Then
  1344.                     Me.Mouse.Image = My.Resources.zeldaleft
  1345.  
  1346.                 ElseIf flip = False Then
  1347.                     Me.Mouse.Image = My.Resources.zeldaright
  1348.  
  1349.                 End If
  1350.  
  1351.                 If flipv = 1 Then
  1352.                     Me.Mouse.Image = My.Resources.zeldaup
  1353.  
  1354.                 ElseIf flipv = 2 Then
  1355.                     Me.Mouse.Image = My.Resources.zeldadown
  1356.  
  1357.                 End If
  1358.             End If
  1359.  
  1360.  
  1361.  
  1362.  
  1363.             'resets boolean var
  1364.  
  1365.             flipv = 0
  1366.             wlogic = False
  1367.         End While
  1368.  
  1369.     End Sub
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.     'walls and cells---------------------------------------------------------------------------------------------
  1379.  
  1380.     'wall toggle code
  1381.    Private Sub h_wall1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall1.Click
  1382.         Walledit(sender)
  1383.  
  1384.     End Sub
  1385.  
  1386.     Private Sub h_wall2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall2.Click
  1387.         Walledit(sender)
  1388.     End Sub
  1389.  
  1390.     Private Sub h_wall3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall3.Click
  1391.         Walledit(sender)
  1392.     End Sub
  1393.  
  1394.     Private Sub h_wall4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall4.Click
  1395.         Walledit(sender)
  1396.     End Sub
  1397.  
  1398.     Private Sub h_wall5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall5.Click
  1399.         Walledit(sender)
  1400.     End Sub
  1401.  
  1402.     Private Sub h_wall6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall6.Click
  1403.         Walledit(sender)
  1404.     End Sub
  1405.  
  1406.     Private Sub h_wall7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall7.Click
  1407.         Walledit(sender)
  1408.     End Sub
  1409.  
  1410.     Private Sub h_wall8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall8.Click
  1411.         Walledit(sender)
  1412.     End Sub
  1413.  
  1414.     Private Sub h_wall9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall9.Click
  1415.         Walledit(sender)
  1416.     End Sub
  1417.  
  1418.     Private Sub h_wall10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall10.Click
  1419.         Walledit(sender)
  1420.     End Sub
  1421.  
  1422.     Private Sub h_wall11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall11.Click
  1423.         Walledit(sender)
  1424.     End Sub
  1425.  
  1426.     Private Sub h_wall12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall12.Click
  1427.         Walledit(sender)
  1428.     End Sub
  1429.  
  1430.     Private Sub h_wall13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall13.Click
  1431.         Walledit(sender)
  1432.     End Sub
  1433.  
  1434.     Private Sub h_wall14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall14.Click
  1435.         Walledit(sender)
  1436.     End Sub
  1437.  
  1438.     Private Sub h_wall15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall15.Click
  1439.         Walledit(sender)
  1440.     End Sub
  1441.  
  1442.     Private Sub h_wall16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall16.Click
  1443.         Walledit(sender)
  1444.     End Sub
  1445.  
  1446.     Private Sub h_wall17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall17.Click
  1447.         Walledit(sender)
  1448.     End Sub
  1449.  
  1450.     Private Sub h_wall18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall18.Click
  1451.         Walledit(sender)
  1452.     End Sub
  1453.  
  1454.     Private Sub h_wall19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall19.Click
  1455.         Walledit(sender)
  1456.     End Sub
  1457.  
  1458.     Private Sub h_wall20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h_wall20.Click
  1459.         Walledit(sender)
  1460.     End Sub
  1461.  
  1462.     Private Sub v_wall1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall1.Click
  1463.         Walledit(sender)
  1464.     End Sub
  1465.  
  1466.     Private Sub v_wall2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall2.Click
  1467.         Walledit(sender)
  1468.     End Sub
  1469.  
  1470.     Private Sub v_wall3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall3.Click
  1471.         Walledit(sender)
  1472.     End Sub
  1473.  
  1474.     Private Sub v_wall4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall4.Click
  1475.         Walledit(sender)
  1476.     End Sub
  1477.  
  1478.     Private Sub v_wall5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall5.Click
  1479.         Walledit(sender)
  1480.     End Sub
  1481.  
  1482.     Private Sub v_wall6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall6.Click
  1483.         Walledit(sender)
  1484.     End Sub
  1485.  
  1486.     Private Sub v_wall7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall7.Click
  1487.         Walledit(sender)
  1488.     End Sub
  1489.  
  1490.     Private Sub v_wall8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall8.Click
  1491.         Walledit(sender)
  1492.     End Sub
  1493.  
  1494.     Private Sub v_wall9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall9.Click
  1495.         Walledit(sender)
  1496.     End Sub
  1497.  
  1498.     Private Sub v_wall10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall10.Click
  1499.         Walledit(sender)
  1500.     End Sub
  1501.  
  1502.     Private Sub v_wall11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall11.Click
  1503.         Walledit(sender)
  1504.     End Sub
  1505.  
  1506.     Private Sub v_wall12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall12.Click
  1507.         Walledit(sender)
  1508.     End Sub
  1509.  
  1510.     Private Sub v_wall13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall13.Click
  1511.         Walledit(sender)
  1512.     End Sub
  1513.  
  1514.     Private Sub v_wall14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall14.Click
  1515.         Walledit(sender)
  1516.     End Sub
  1517.  
  1518.     Private Sub v_wall15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall15.Click
  1519.         Walledit(sender)
  1520.     End Sub
  1521.  
  1522.     Private Sub v_wall16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall16.Click
  1523.         Walledit(sender)
  1524.     End Sub
  1525.  
  1526.     Private Sub v_wall17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall17.Click
  1527.         Walledit(sender)
  1528.     End Sub
  1529.  
  1530.     Private Sub v_wall18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall18.Click
  1531.         Walledit(sender)
  1532.     End Sub
  1533.  
  1534.     Private Sub v_wall19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall19.Click
  1535.         Walledit(sender)
  1536.     End Sub
  1537.  
  1538.     Private Sub v_wall20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles v_wall20.Click
  1539.         Walledit(sender)
  1540.     End Sub
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.     'mouse and goal placement code
  1549.    Private Sub cell1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell1.Click
  1550.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  1551.            locx = 0
  1552.             locy = 0
  1553.             'MessageBox.Show(Me.Mouse.Left)
  1554.            Me.Mouse.Left = 40
  1555.             Me.Mouse.Top = 60
  1556.             Me.Mouse.Left = Me.Mouse.Left + locx
  1557.             Me.Mouse.Top = Me.Mouse.Top + locy
  1558.             cellToggle(toggle:="off")
  1559.             Mouse.Show()
  1560.             m_vis = True
  1561.             toolssetmouse.Checked = False
  1562.  
  1563.         End If
  1564.  
  1565.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  1566.  
  1567.             g_locx = -200
  1568.             g_locy = -300
  1569.             Me.Goal.Left = 240
  1570.             Me.Goal.Top = 360
  1571.             Me.Goal.Left = Me.Goal.Left + g_locx
  1572.             Me.Goal.Top = Me.Goal.Top + g_locy
  1573.             cellToggle(toggle:="off")
  1574.             Goal.Show()
  1575.             g_vis = True
  1576.             toolssetgoal.Checked = False
  1577.  
  1578.  
  1579.         End If
  1580.  
  1581.     End Sub
  1582.  
  1583.     Private Sub cell2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell2.Click
  1584.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  1585.            locx = 100
  1586.             locy = 0
  1587.             'MessageBox.Show(Me.Mouse.Left)
  1588.            Me.Mouse.Left = 40
  1589.             Me.Mouse.Top = 60
  1590.             Me.Mouse.Left = Me.Mouse.Left + locx
  1591.             Me.Mouse.Top = Me.Mouse.Top + locy
  1592.             cellToggle(toggle:="off")
  1593.             Mouse.Show()
  1594.             m_vis = True
  1595.             toolssetmouse.Checked = False
  1596.         End If
  1597.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  1598.  
  1599.             g_locx = -100
  1600.             g_locy = -300
  1601.             Me.Goal.Left = 240
  1602.             Me.Goal.Top = 360
  1603.             Me.Goal.Left = Me.Goal.Left + g_locx
  1604.             Me.Goal.Top = Me.Goal.Top + g_locy
  1605.             cellToggle(toggle:="off")
  1606.             Goal.Show()
  1607.             g_vis = True
  1608.             toolssetgoal.Checked = False
  1609.  
  1610.  
  1611.         End If
  1612.     End Sub
  1613.  
  1614.     Private Sub cell3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell3.Click
  1615.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  1616.            locx = 200
  1617.             locy = 0
  1618.             'MessageBox.Show(Me.Mouse.Left)
  1619.            Me.Mouse.Left = 40
  1620.             Me.Mouse.Top = 60
  1621.             Me.Mouse.Left = Me.Mouse.Left + locx
  1622.             Me.Mouse.Top = Me.Mouse.Top + locy
  1623.             cellToggle(toggle:="off")
  1624.             Mouse.Show()
  1625.             m_vis = True
  1626.             toolssetmouse.Checked = False
  1627.         End If
  1628.  
  1629.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  1630.  
  1631.             g_locx = 0
  1632.             g_locy = -300
  1633.             Me.Goal.Left = 240
  1634.             Me.Goal.Top = 360
  1635.             Me.Goal.Left = Me.Goal.Left + g_locx
  1636.             Me.Goal.Top = Me.Goal.Top + g_locy
  1637.             cellToggle(toggle:="off")
  1638.             Goal.Show()
  1639.             g_vis = True
  1640.             toolssetgoal.Checked = False
  1641.  
  1642.  
  1643.         End If
  1644.  
  1645.     End Sub
  1646.  
  1647.     Private Sub cell4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell4.Click
  1648.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  1649.            locx = 300
  1650.             locy = 0
  1651.             'MessageBox.Show(Me.Mouse.Left)
  1652.            Me.Mouse.Left = 40
  1653.             Me.Mouse.Top = 60
  1654.             Me.Mouse.Left = Me.Mouse.Left + locx
  1655.             Me.Mouse.Top = Me.Mouse.Top + locy
  1656.             cellToggle(toggle:="off")
  1657.             Mouse.Show()
  1658.             m_vis = True
  1659.             toolssetmouse.Checked = False
  1660.         End If
  1661.  
  1662.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  1663.  
  1664.             g_locx = 100
  1665.             g_locy = -300
  1666.             Me.Goal.Left = 240
  1667.             Me.Goal.Top = 360
  1668.             Me.Goal.Left = Me.Goal.Left + g_locx
  1669.             Me.Goal.Top = Me.Goal.Top + g_locy
  1670.             cellToggle(toggle:="off")
  1671.             Goal.Show()
  1672.             g_vis = True
  1673.             toolssetgoal.Checked = False
  1674.  
  1675.  
  1676.         End If
  1677.     End Sub
  1678.  
  1679.     Private Sub cell5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell5.Click
  1680.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  1681.            locx = 400
  1682.             locy = 0
  1683.             'MessageBox.Show(Me.Mouse.Left)
  1684.            Me.Mouse.Left = 40
  1685.             Me.Mouse.Top = 60
  1686.             Me.Mouse.Left = Me.Mouse.Left + locx
  1687.             Me.Mouse.Top = Me.Mouse.Top + locy
  1688.             cellToggle(toggle:="off")
  1689.             Mouse.Show()
  1690.             m_vis = True
  1691.             toolssetmouse.Checked = False
  1692.         End If
  1693.  
  1694.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  1695.  
  1696.             g_locx = 200
  1697.             g_locy = -300
  1698.             Me.Goal.Left = 240
  1699.             Me.Goal.Top = 360
  1700.             Me.Goal.Left = Me.Goal.Left + g_locx
  1701.             Me.Goal.Top = Me.Goal.Top + g_locy
  1702.             cellToggle(toggle:="off")
  1703.             Goal.Show()
  1704.             g_vis = True
  1705.             toolssetgoal.Checked = False
  1706.  
  1707.  
  1708.         End If
  1709.  
  1710.     End Sub
  1711.  
  1712.     Private Sub cell6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell6.Click
  1713.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  1714.            locx = 0
  1715.             locy = 100
  1716.             'MessageBox.Show(Me.Mouse.Left)
  1717.            Me.Mouse.Left = 40
  1718.             Me.Mouse.Top = 60
  1719.             Me.Mouse.Left = Me.Mouse.Left + locx
  1720.             Me.Mouse.Top = Me.Mouse.Top + locy
  1721.             cellToggle(toggle:="off")
  1722.             Mouse.Show()
  1723.             m_vis = True
  1724.             toolssetmouse.Checked = False
  1725.         End If
  1726.  
  1727.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  1728.  
  1729.             g_locx = -200
  1730.             g_locy = -200
  1731.             Me.Goal.Left = 240
  1732.             Me.Goal.Top = 360
  1733.             Me.Goal.Left = Me.Goal.Left + g_locx
  1734.             Me.Goal.Top = Me.Goal.Top + g_locy
  1735.             cellToggle(toggle:="off")
  1736.             Goal.Show()
  1737.             g_vis = True
  1738.             toolssetgoal.Checked = False
  1739.  
  1740.  
  1741.         End If
  1742.  
  1743.     End Sub
  1744.  
  1745.     Private Sub cell7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell7.Click
  1746.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  1747.            locx = 100
  1748.             locy = 100
  1749.             'MessageBox.Show(Me.Mouse.Left)
  1750.            Me.Mouse.Left = 40
  1751.             Me.Mouse.Top = 60
  1752.             Me.Mouse.Left = Me.Mouse.Left + locx
  1753.             Me.Mouse.Top = Me.Mouse.Top + locy
  1754.             cellToggle(toggle:="off")
  1755.             Mouse.Show()
  1756.             m_vis = True
  1757.             toolssetmouse.Checked = False
  1758.         End If
  1759.  
  1760.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  1761.  
  1762.             g_locx = -100
  1763.             g_locy = -200
  1764.             Me.Goal.Left = 240
  1765.             Me.Goal.Top = 360
  1766.             Me.Goal.Left = Me.Goal.Left + g_locx
  1767.             Me.Goal.Top = Me.Goal.Top + g_locy
  1768.             cellToggle(toggle:="off")
  1769.             Goal.Show()
  1770.             g_vis = True
  1771.             toolssetgoal.Checked = False
  1772.  
  1773.  
  1774.         End If
  1775.  
  1776.     End Sub
  1777.  
  1778.     Private Sub cell8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell8.Click
  1779.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  1780.            locx = 200
  1781.             locy = 100
  1782.             'MessageBox.Show(Me.Mouse.Left)
  1783.            Me.Mouse.Left = 40
  1784.             Me.Mouse.Top = 60
  1785.             Me.Mouse.Left = Me.Mouse.Left + locx
  1786.             Me.Mouse.Top = Me.Mouse.Top + locy
  1787.             cellToggle(toggle:="off")
  1788.             Mouse.Show()
  1789.             m_vis = True
  1790.             toolssetmouse.Checked = False
  1791.         End If
  1792.  
  1793.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  1794.  
  1795.             g_locx = 0
  1796.             g_locy = -200
  1797.             Me.Goal.Left = 240
  1798.             Me.Goal.Top = 360
  1799.             Me.Goal.Left = Me.Goal.Left + g_locx
  1800.             Me.Goal.Top = Me.Goal.Top + g_locy
  1801.             cellToggle(toggle:="off")
  1802.             Goal.Show()
  1803.             g_vis = True
  1804.             toolssetgoal.Checked = False
  1805.  
  1806.  
  1807.         End If
  1808.  
  1809.     End Sub
  1810.  
  1811.     Private Sub cell9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell9.Click
  1812.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  1813.            locx = 300
  1814.             locy = 100
  1815.             'MessageBox.Show(Me.Mouse.Left)
  1816.            Me.Mouse.Left = 40
  1817.             Me.Mouse.Top = 60
  1818.             Me.Mouse.Left = Me.Mouse.Left + locx
  1819.             Me.Mouse.Top = Me.Mouse.Top + locy
  1820.             cellToggle(toggle:="off")
  1821.             Mouse.Show()
  1822.             m_vis = True
  1823.             toolssetmouse.Checked = False
  1824.         End If
  1825.  
  1826.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  1827.  
  1828.             g_locx = 100
  1829.             g_locy = -200
  1830.             Me.Goal.Left = 240
  1831.             Me.Goal.Top = 360
  1832.             Me.Goal.Left = Me.Goal.Left + g_locx
  1833.             Me.Goal.Top = Me.Goal.Top + g_locy
  1834.             cellToggle(toggle:="off")
  1835.             Goal.Show()
  1836.             g_vis = True
  1837.             toolssetgoal.Checked = False
  1838.  
  1839.  
  1840.         End If
  1841.  
  1842.     End Sub
  1843.  
  1844.     Private Sub cell10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell10.Click
  1845.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  1846.            locx = 400
  1847.             locy = 100
  1848.             'MessageBox.Show(Me.Mouse.Left)
  1849.            Me.Mouse.Left = 40
  1850.             Me.Mouse.Top = 60
  1851.             Me.Mouse.Left = Me.Mouse.Left + locx
  1852.             Me.Mouse.Top = Me.Mouse.Top + locy
  1853.             cellToggle(toggle:="off")
  1854.             Mouse.Show()
  1855.             m_vis = True
  1856.             toolssetmouse.Checked = False
  1857.         End If
  1858.  
  1859.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  1860.  
  1861.             g_locx = 200
  1862.             g_locy = -200
  1863.             Me.Goal.Left = 240
  1864.             Me.Goal.Top = 360
  1865.             Me.Goal.Left = Me.Goal.Left + g_locx
  1866.             Me.Goal.Top = Me.Goal.Top + g_locy
  1867.             cellToggle(toggle:="off")
  1868.             Goal.Show()
  1869.             g_vis = True
  1870.             toolssetgoal.Checked = False
  1871.  
  1872.  
  1873.         End If
  1874.  
  1875.     End Sub
  1876.  
  1877.     Private Sub cell11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell11.Click
  1878.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  1879.            locx = 0
  1880.             locy = 200
  1881.             'MessageBox.Show(Me.Mouse.Left)
  1882.            Me.Mouse.Left = 40
  1883.             Me.Mouse.Top = 60
  1884.             Me.Mouse.Left = Me.Mouse.Left + locx
  1885.             Me.Mouse.Top = Me.Mouse.Top + locy
  1886.             cellToggle(toggle:="off")
  1887.             Mouse.Show()
  1888.             m_vis = True
  1889.             toolssetmouse.Checked = False
  1890.         End If
  1891.  
  1892.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  1893.  
  1894.             g_locx = -200
  1895.             g_locy = -100
  1896.             Me.Goal.Left = 240
  1897.             Me.Goal.Top = 360
  1898.             Me.Goal.Left = Me.Goal.Left + g_locx
  1899.             Me.Goal.Top = Me.Goal.Top + g_locy
  1900.             cellToggle(toggle:="off")
  1901.             Goal.Show()
  1902.             g_vis = True
  1903.             toolssetgoal.Checked = False
  1904.  
  1905.  
  1906.         End If
  1907.  
  1908.     End Sub
  1909.  
  1910.     Private Sub cell12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell12.Click
  1911.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  1912.            locx = 100
  1913.             locy = 200
  1914.             'MessageBox.Show(Me.Mouse.Left)
  1915.            Me.Mouse.Left = 40
  1916.             Me.Mouse.Top = 60
  1917.             Me.Mouse.Left = Me.Mouse.Left + locx
  1918.             Me.Mouse.Top = Me.Mouse.Top + locy
  1919.             cellToggle(toggle:="off")
  1920.             Mouse.Show()
  1921.             m_vis = True
  1922.             toolssetmouse.Checked = False
  1923.         End If
  1924.  
  1925.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  1926.  
  1927.             g_locx = -100
  1928.             g_locy = -100
  1929.             Me.Goal.Left = 240
  1930.             Me.Goal.Top = 360
  1931.             Me.Goal.Left = Me.Goal.Left + g_locx
  1932.             Me.Goal.Top = Me.Goal.Top + g_locy
  1933.             cellToggle(toggle:="off")
  1934.             Goal.Show()
  1935.             g_vis = True
  1936.             toolssetgoal.Checked = False
  1937.  
  1938.  
  1939.         End If
  1940.  
  1941.     End Sub
  1942.  
  1943.     Private Sub cell13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell13.Click
  1944.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  1945.            locx = 200
  1946.             locy = 200
  1947.             'MessageBox.Show(Me.Mouse.Left)
  1948.            Me.Mouse.Left = 40
  1949.             Me.Mouse.Top = 60
  1950.             Me.Mouse.Left = Me.Mouse.Left + locx
  1951.             Me.Mouse.Top = Me.Mouse.Top + locy
  1952.             cellToggle(toggle:="off")
  1953.             Mouse.Show()
  1954.             m_vis = True
  1955.             toolssetmouse.Checked = False
  1956.         End If
  1957.  
  1958.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  1959.  
  1960.             g_locx = 0
  1961.             g_locy = -100
  1962.             Me.Goal.Left = 240
  1963.             Me.Goal.Top = 360
  1964.             Me.Goal.Left = Me.Goal.Left + g_locx
  1965.             Me.Goal.Top = Me.Goal.Top + g_locy
  1966.             cellToggle(toggle:="off")
  1967.             Goal.Show()
  1968.             g_vis = True
  1969.             toolssetgoal.Checked = False
  1970.  
  1971.  
  1972.         End If
  1973.  
  1974.     End Sub
  1975.  
  1976.     Private Sub cell14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell14.Click
  1977.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  1978.            locx = 300
  1979.             locy = 200
  1980.             'MessageBox.Show(Me.Mouse.Left)
  1981.            Me.Mouse.Left = 40
  1982.             Me.Mouse.Top = 60
  1983.             Me.Mouse.Left = Me.Mouse.Left + locx
  1984.             Me.Mouse.Top = Me.Mouse.Top + locy
  1985.             cellToggle(toggle:="off")
  1986.             Mouse.Show()
  1987.             m_vis = True
  1988.             toolssetmouse.Checked = False
  1989.         End If
  1990.  
  1991.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  1992.  
  1993.             g_locx = 100
  1994.             g_locy = -100
  1995.             Me.Goal.Left = 240
  1996.             Me.Goal.Top = 360
  1997.             Me.Goal.Left = Me.Goal.Left + g_locx
  1998.             Me.Goal.Top = Me.Goal.Top + g_locy
  1999.             cellToggle(toggle:="off")
  2000.             Goal.Show()
  2001.             g_vis = True
  2002.             toolssetgoal.Checked = False
  2003.  
  2004.  
  2005.         End If
  2006.  
  2007.     End Sub
  2008.  
  2009.     Private Sub cell15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell15.Click
  2010.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  2011.            locx = 400
  2012.             locy = 200
  2013.             'MessageBox.Show(Me.Mouse.Left)
  2014.            Me.Mouse.Left = 40
  2015.             Me.Mouse.Top = 60
  2016.             Me.Mouse.Left = Me.Mouse.Left + locx
  2017.             Me.Mouse.Top = Me.Mouse.Top + locy
  2018.             cellToggle(toggle:="off")
  2019.             Mouse.Show()
  2020.             m_vis = True
  2021.             toolssetmouse.Checked = False
  2022.         End If
  2023.  
  2024.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  2025.  
  2026.             g_locx = 200
  2027.             g_locy = -100
  2028.             Me.Goal.Left = 240
  2029.             Me.Goal.Top = 360
  2030.             Me.Goal.Left = Me.Goal.Left + g_locx
  2031.             Me.Goal.Top = Me.Goal.Top + g_locy
  2032.             cellToggle(toggle:="off")
  2033.             Goal.Show()
  2034.             g_vis = True
  2035.             toolssetgoal.Checked = False
  2036.  
  2037.  
  2038.         End If
  2039.  
  2040.     End Sub
  2041.  
  2042.     Private Sub cell16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell16.Click
  2043.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  2044.            locx = 0
  2045.             locy = 300
  2046.             'MessageBox.Show(Me.Mouse.Left)
  2047.            Me.Mouse.Left = 40
  2048.             Me.Mouse.Top = 60
  2049.             Me.Mouse.Left = Me.Mouse.Left + locx
  2050.             Me.Mouse.Top = Me.Mouse.Top + locy
  2051.             cellToggle(toggle:="off")
  2052.             Mouse.Show()
  2053.             m_vis = True
  2054.             toolssetmouse.Checked = False
  2055.         End If
  2056.  
  2057.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  2058.  
  2059.             g_locx = -200
  2060.             g_locy = 0
  2061.             Me.Goal.Left = 240
  2062.             Me.Goal.Top = 360
  2063.             Me.Goal.Left = Me.Goal.Left + g_locx
  2064.             Me.Goal.Top = Me.Goal.Top + g_locy
  2065.             cellToggle(toggle:="off")
  2066.             Goal.Show()
  2067.             g_vis = True
  2068.             toolssetgoal.Checked = False
  2069.  
  2070.  
  2071.         End If
  2072.  
  2073.     End Sub
  2074.  
  2075.     Private Sub cell17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell17.Click
  2076.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  2077.            locx = 100
  2078.             locy = 300
  2079.             'MessageBox.Show(Me.Mouse.Left)
  2080.            Me.Mouse.Left = 40
  2081.             Me.Mouse.Top = 60
  2082.             Me.Mouse.Left = Me.Mouse.Left + locx
  2083.             Me.Mouse.Top = Me.Mouse.Top + locy
  2084.             cellToggle(toggle:="off")
  2085.             Mouse.Show()
  2086.             m_vis = True
  2087.             toolssetmouse.Checked = False
  2088.         End If
  2089.  
  2090.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  2091.  
  2092.             g_locx = -100
  2093.             g_locy = 0
  2094.             Me.Goal.Left = 240
  2095.             Me.Goal.Top = 360
  2096.             Me.Goal.Left = Me.Goal.Left + g_locx
  2097.             Me.Goal.Top = Me.Goal.Top + g_locy
  2098.             cellToggle(toggle:="off")
  2099.             Goal.Show()
  2100.             g_vis = True
  2101.             toolssetgoal.Checked = False
  2102.  
  2103.  
  2104.         End If
  2105.  
  2106.     End Sub
  2107.  
  2108.     Private Sub cell18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell18.Click
  2109.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  2110.            locx = 200
  2111.             locy = 300
  2112.             'MessageBox.Show(Me.Mouse.Left)
  2113.            Me.Mouse.Left = 40
  2114.             Me.Mouse.Top = 60
  2115.             Me.Mouse.Left = Me.Mouse.Left + locx
  2116.             Me.Mouse.Top = Me.Mouse.Top + locy
  2117.             cellToggle(toggle:="off")
  2118.             Mouse.Show()
  2119.             m_vis = True
  2120.             toolssetmouse.Checked = False
  2121.         End If
  2122.  
  2123.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  2124.  
  2125.             g_locx = 0
  2126.             g_locy = 0
  2127.             Me.Goal.Left = 240
  2128.             Me.Goal.Top = 360
  2129.             Me.Goal.Left = Me.Goal.Left + g_locx
  2130.             Me.Goal.Top = Me.Goal.Top + g_locy
  2131.             cellToggle(toggle:="off")
  2132.             Goal.Show()
  2133.             g_vis = True
  2134.             toolssetgoal.Checked = False
  2135.  
  2136.  
  2137.         End If
  2138.  
  2139.     End Sub
  2140.  
  2141.     Private Sub cell19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell19.Click
  2142.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  2143.            locx = 300
  2144.             locy = 300
  2145.             'MessageBox.Show(Me.Mouse.Left)
  2146.            Me.Mouse.Left = 40
  2147.             Me.Mouse.Top = 60
  2148.             Me.Mouse.Left = Me.Mouse.Left + locx
  2149.             Me.Mouse.Top = Me.Mouse.Top + locy
  2150.             cellToggle(toggle:="off")
  2151.             Mouse.Show()
  2152.             m_vis = True
  2153.             toolssetmouse.Checked = False
  2154.         End If
  2155.  
  2156.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  2157.  
  2158.             g_locx = 100
  2159.             g_locy = 0
  2160.             Me.Goal.Left = 240
  2161.             Me.Goal.Top = 360
  2162.             Me.Goal.Left = Me.Goal.Left + g_locx
  2163.             Me.Goal.Top = Me.Goal.Top + g_locy
  2164.             cellToggle(toggle:="off")
  2165.             Goal.Show()
  2166.             g_vis = True
  2167.             toolssetgoal.Checked = False
  2168.  
  2169.  
  2170.         End If
  2171.  
  2172.     End Sub
  2173.  
  2174.     Private Sub cell20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell20.Click
  2175.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  2176.            locx = 400
  2177.             locy = 300
  2178.             'MessageBox.Show(Me.Mouse.Left)
  2179.            Me.Mouse.Left = 40
  2180.             Me.Mouse.Top = 60
  2181.             Me.Mouse.Left = Me.Mouse.Left + locx
  2182.             Me.Mouse.Top = Me.Mouse.Top + locy
  2183.             cellToggle(toggle:="off")
  2184.             Mouse.Show()
  2185.             m_vis = True
  2186.             toolssetmouse.Checked = False
  2187.         End If
  2188.  
  2189.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  2190.  
  2191.             g_locx = 200
  2192.             g_locy = 0
  2193.             Me.Goal.Left = 240
  2194.             Me.Goal.Top = 360
  2195.             Me.Goal.Left = Me.Goal.Left + g_locx
  2196.             Me.Goal.Top = Me.Goal.Top + g_locy
  2197.             cellToggle(toggle:="off")
  2198.             Goal.Show()
  2199.             g_vis = True
  2200.             toolssetgoal.Checked = False
  2201.  
  2202.  
  2203.         End If
  2204.  
  2205.     End Sub
  2206.  
  2207.     Private Sub cell21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell21.Click
  2208.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  2209.            locx = 0
  2210.             locy = 400
  2211.             'MessageBox.Show(Me.Mouse.Left)
  2212.            Me.Mouse.Left = 40
  2213.             Me.Mouse.Top = 60
  2214.             Me.Mouse.Left = Me.Mouse.Left + locx
  2215.             Me.Mouse.Top = Me.Mouse.Top + locy
  2216.             cellToggle(toggle:="off")
  2217.             Mouse.Show()
  2218.             m_vis = True
  2219.             toolssetmouse.Checked = False
  2220.         End If
  2221.  
  2222.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  2223.  
  2224.             g_locx = -200
  2225.             g_locy = 100
  2226.             Me.Goal.Left = 240
  2227.             Me.Goal.Top = 360
  2228.             Me.Goal.Left = Me.Goal.Left + g_locx
  2229.             Me.Goal.Top = Me.Goal.Top + g_locy
  2230.             cellToggle(toggle:="off")
  2231.             Goal.Show()
  2232.             g_vis = True
  2233.             toolssetgoal.Checked = False
  2234.  
  2235.  
  2236.         End If
  2237.  
  2238.     End Sub
  2239.  
  2240.     Private Sub cell22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell22.Click
  2241.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  2242.            locx = 100
  2243.             locy = 400
  2244.             'MessageBox.Show(Me.Mouse.Left)
  2245.            Me.Mouse.Left = 40
  2246.             Me.Mouse.Top = 60
  2247.             Me.Mouse.Left = Me.Mouse.Left + locx
  2248.             Me.Mouse.Top = Me.Mouse.Top + locy
  2249.             cellToggle(toggle:="off")
  2250.             Mouse.Show()
  2251.             m_vis = True
  2252.             toolssetmouse.Checked = False
  2253.         End If
  2254.  
  2255.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  2256.  
  2257.             g_locx = -100
  2258.             g_locy = 100
  2259.             Me.Goal.Left = 240
  2260.             Me.Goal.Top = 360
  2261.             Me.Goal.Left = Me.Goal.Left + g_locx
  2262.             Me.Goal.Top = Me.Goal.Top + g_locy
  2263.             cellToggle(toggle:="off")
  2264.             Goal.Show()
  2265.             g_vis = True
  2266.             toolssetgoal.Checked = False
  2267.  
  2268.  
  2269.         End If
  2270.  
  2271.     End Sub
  2272.  
  2273.     Private Sub cell23_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell23.Click
  2274.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  2275.            locx = 200
  2276.             locy = 400
  2277.             'MessageBox.Show(Me.Mouse.Left)
  2278.            Me.Mouse.Left = 40
  2279.             Me.Mouse.Top = 60
  2280.             Me.Mouse.Left = Me.Mouse.Left + locx
  2281.             Me.Mouse.Top = Me.Mouse.Top + locy
  2282.             cellToggle(toggle:="off")
  2283.             Mouse.Show()
  2284.             m_vis = True
  2285.             toolssetmouse.Checked = False
  2286.         End If
  2287.  
  2288.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  2289.  
  2290.             g_locx = 0
  2291.             g_locy = 100
  2292.             Me.Goal.Left = 240
  2293.             Me.Goal.Top = 360
  2294.             Me.Goal.Left = Me.Goal.Left + g_locx
  2295.             Me.Goal.Top = Me.Goal.Top + g_locy
  2296.             cellToggle(toggle:="off")
  2297.             Goal.Show()
  2298.             g_vis = True
  2299.             toolssetgoal.Checked = False
  2300.  
  2301.  
  2302.         End If
  2303.  
  2304.     End Sub
  2305.  
  2306.     Private Sub cell24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell24.Click
  2307.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  2308.            locx = 300
  2309.             locy = 400
  2310.             'MessageBox.Show(Me.Mouse.Left)
  2311.            Me.Mouse.Left = 40
  2312.             Me.Mouse.Top = 60
  2313.             Me.Mouse.Left = Me.Mouse.Left + locx
  2314.             Me.Mouse.Top = Me.Mouse.Top + locy
  2315.             cellToggle(toggle:="off")
  2316.             Mouse.Show()
  2317.             m_vis = True
  2318.             toolssetmouse.Checked = False
  2319.         End If
  2320.  
  2321.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  2322.  
  2323.             g_locx = 100
  2324.             g_locy = 100
  2325.             Me.Goal.Left = 240
  2326.             Me.Goal.Top = 360
  2327.             Me.Goal.Left = Me.Goal.Left + g_locx
  2328.             Me.Goal.Top = Me.Goal.Top + g_locy
  2329.             cellToggle(toggle:="off")
  2330.             Goal.Show()
  2331.             g_vis = True
  2332.             toolssetgoal.Checked = False
  2333.  
  2334.  
  2335.         End If
  2336.  
  2337.     End Sub
  2338.  
  2339.     Private Sub cell25_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cell25.Click
  2340.         If editMouse = True Then ' set new locx/y variable, reset me.mouse.left/up, toggle cells, show mouse, toggle mouse visibility m_vis
  2341.            locx = 400
  2342.             locy = 400
  2343.             'MessageBox.Show(Me.Mouse.Left)
  2344.            Me.Mouse.Left = 40
  2345.             Me.Mouse.Top = 60
  2346.             Me.Mouse.Left = Me.Mouse.Left + locx
  2347.             Me.Mouse.Top = Me.Mouse.Top + locy
  2348.             cellToggle(toggle:="off")
  2349.             Mouse.Show()
  2350.             m_vis = True
  2351.             toolssetmouse.Checked = False
  2352.         End If
  2353.  
  2354.         If editGoal = True Then '' set new locx/y variable, reset me.goal.left/up, toggle cells, show goal, toggle goal visibility g_vis
  2355.  
  2356.             g_locx = 200
  2357.             g_locy = 100
  2358.             Me.Goal.Left = 240
  2359.             Me.Goal.Top = 360
  2360.             Me.Goal.Left = Me.Goal.Left + g_locx
  2361.             Me.Goal.Top = Me.Goal.Top + g_locy
  2362.             cellToggle(toggle:="off")
  2363.             Goal.Show()
  2364.             g_vis = True
  2365.             toolssetgoal.Checked = False
  2366.  
  2367.  
  2368.         End If
  2369.  
  2370.     End Sub
  2371.  
  2372.  
  2373.  
  2374.  
  2375.     '_________________________________________________
  2376.  
  2377.     'switches run button text from run to pause versa vice
  2378.    Private Sub Run_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Run.Click
  2379.         'run option selected in file
  2380.  
  2381.         If runbutton = True Then
  2382.             Run.Text = "Pause" + vbNewLine + "| |"
  2383.             runbutton = False
  2384.             runpause.Checked = True
  2385.  
  2386.         ElseIf runbutton = False Then
  2387.             Run.Text = "Run"
  2388.             runbutton = True
  2389.             runpause.Checked = False
  2390.  
  2391.         End If
  2392.     End Sub
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423. End Class
Advertisement
Add Comment
Please, Sign In to add comment