★ VB.NET | Mouse Maze ★
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
Hello guys, in this tutorial im going to teach you how to make a mouse maze game in vb.net it will be done in visual basic 2010 if you don't have it download it from Visual Basic 2010
»Ok now start Visual basic and create new project (Windows Form Application) and name it whatever you want
![Image]()
The Designing part :-
»Now change the Form Properties
Text = "Mouse Maze" you can name it whatever you want
FormBorderStyle = "Fixed Single"
MaxmimizeBox = False
![Image]()
»Add Lines from Toolbox > VisualBasic PowerPacks > Line
»Add 1 Label from Toolbox > Common Controls > Label
»Add 1 Button from Toolbox > Common Controls > Button
![Image]()
»Change Label1 Text to Start
»Change Button1 Text to Win!
»Change Button1 Enabled to False
»And Now Design the Maze with the lines and add in the start The label and at the end the Button
![Image]()
Now The Coding Part :-
»Double-Click on Label1(Start)
And change the "Click" ( At the top ) to "Mouse Enter"
![Image]()
»and add this code between Private Label1_Mouse Enter.... And End Sub
Add this code
and add this code
Add four labels at the buttom and Change label2 text to "Times Won : "
Change Label3 text to "0"
Change Label4 text to "0"
And Arrange it from label2 to label 5
and now change the button1(win) code to
If you want a source code for Mouse Maze Game With Levels and lifes and many other features make 4 things !
(Rate, Download, Comment, +rep!)
»Ok now start Visual basic and create new project (Windows Form Application) and name it whatever you want

The Designing part :-
»Now change the Form Properties
Text = "Mouse Maze" you can name it whatever you want
FormBorderStyle = "Fixed Single"
MaxmimizeBox = False

»Add Lines from Toolbox > VisualBasic PowerPacks > Line
»Add 1 Label from Toolbox > Common Controls > Label
»Add 1 Button from Toolbox > Common Controls > Button

»Change Label1 Text to Start
»Change Button1 Text to Win!
»Change Button1 Enabled to False
»And Now Design the Maze with the lines and add in the start The label and at the end the Button

Now The Coding Part :-
»Double-Click on Label1(Start)
And change the "Click" ( At the top ) to "Mouse Enter"

»and add this code between Private Label1_Mouse Enter.... And End Sub
Code: Select all
»Back to the form and double-click on Button1(Win)Button1.Enabled = True 'It will enabled the win button so you can click it and win!
Add this code
Code: Select all
»Now the hardest part, On Each Line you must double-click it and change the "Click" to "Mouse Enter"Msgbox("You Won!") 'Will popup a message and the text will be between " and "
and add this code
Code: Select all
For additional features like "Times Losed and Times Won"Button1.Enabled = False 'it will disable the win button so you must go to start and go to win
Add four labels at the buttom and Change label2 text to "Times Won : "
Change Label3 text to "0"
Change Label4 text to "0"
And Arrange it from label2 to label 5
and now change the button1(win) code to
Code: Select all
And Change everyline code!! to
Msgbox("You Win!")
Label3.text += 1
Code: Select all
The whole Codes (Delete all codes and paste this)Button1.Enabled = False
Label5.text = += 1
Code: Select all
Public Class Form1
Private Sub Label1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.MouseHover
Button1.Enabled = True
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("You Won!")
Label3.Text += 1
End Sub
Private Sub LineShape10_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles LineShape10.MouseEnter
Button1.Enabled = False
Label5.Text += 1
End Sub
Private Sub LineShape9_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles LineShape9.MouseEnter
Button1.Enabled = False
Label5.Text += 1
End Sub
Private Sub LineShape8_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles LineShape8.MouseEnter
Button1.Enabled = False
Label5.Text += 1
End Sub
Private Sub LineShape7_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles LineShape7.MouseEnter
Button1.Enabled = False
Label5.Text += 1
End Sub
Private Sub LineShape6_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles LineShape6.MouseEnter
Button1.Enabled = False
Label5.Text += 1
End Sub
Private Sub LineShape5_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles LineShape5.MouseEnter
Button1.Enabled = False
Label5.Text += 1
End Sub
Private Sub LineShape4_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles LineShape4.MouseEnter
Button1.Enabled = False
Label5.Text += 1
End Sub
Private Sub LineShape3_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles LineShape3.MouseEnter
Button1.Enabled = False
Label5.Text += 1
End Sub
Private Sub LineShape2_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles LineShape2.MouseEnter
Button1.Enabled = False
Label5.Text += 1
End Sub
Private Sub LineShape1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles LineShape1.MouseEnter
Button1.Enabled = False
Label5.Text += 1
End Sub
End Class
If you want a source code for Mouse Maze Game With Levels and lifes and many other features make 4 things !
(Rate, Download, Comment, +rep!)
You do not have the required permissions to view the files attached to this post.
Code'N'Stuff
OneTeam..OneDream
Join ABSplash Team & Earn $$
ABSplash Site - Workpad - (VB) Custom Buttons 2 ways
OneTeam..OneDream
Join ABSplash Team & Earn $$
ABSplash Site - Workpad - (VB) Custom Buttons 2 ways
You can simplify all of your .MouseEnter subs there that handle the lines by doing something like this:
EDIT: "Line" might be "LineShape", now that I look at your code again. Not sure though, I've never used one.
Code: Select all
Also, it is good programming practice to rename your components with their corresponding 3-letter prefix and a name (for a line, it's "lne"), instead of something like "Line1", etc.Sub LinesMouseEnter(ByVal sender As Object, ByVal e as EventArgs) Handles Line1.MouseEnter, Line2.MouseEnter, Line3.MouseEnter, etc.
Dim line As Line = CType(sender, Line)
'The rest of your code will go here. The entered line's data will be stored into "line"
End Sub
EDIT: "Line" might be "LineShape", now that I look at your code again. Not sure though, I've never used one.
Thanks BlakPilar and about the Line and LineShape its the same lol!
Thanks for your comment
Thanks for your comment
Code'N'Stuff
OneTeam..OneDream
Join ABSplash Team & Earn $$
ABSplash Site - Workpad - (VB) Custom Buttons 2 ways
OneTeam..OneDream
Join ABSplash Team & Earn $$
ABSplash Site - Workpad - (VB) Custom Buttons 2 ways
@shekoasinger
to make it detect the fast movements use
instead of "MouseHover" , "MouseEnter"
Thanks
to make it detect the fast movements use
instead of "MouseHover" , "MouseEnter"
Thanks
Code'N'Stuff
OneTeam..OneDream
Join ABSplash Team & Earn $$
ABSplash Site - Workpad - (VB) Custom Buttons 2 ways
OneTeam..OneDream
Join ABSplash Team & Earn $$
ABSplash Site - Workpad - (VB) Custom Buttons 2 ways
Was bored so i updated it a bit.
You do not have the required permissions to view the files attached to this post.
Just another day in my life.
http://www.codexvideos.com
http://www.codexvideos.com
Thank you Runar for the red lines 

Code'N'Stuff
OneTeam..OneDream
Join ABSplash Team & Earn $$
ABSplash Site - Workpad - (VB) Custom Buttons 2 ways
OneTeam..OneDream
Join ABSplash Team & Earn $$
ABSplash Site - Workpad - (VB) Custom Buttons 2 ways
*Updated it again =)
*The blue one is to open the orange one.
*The blue one is to open the orange one.
You do not have the required permissions to view the files attached to this post.
Just another day in my life.
http://www.codexvideos.com
http://www.codexvideos.com
guys im making same this app in vb.net 2013 i have done login and registration and now i found i dont have the line shape in my vb :( it doesnt even have Visaul Basic Powerpacks in the tool box
do u know how to get that??
loove;
do u know how to get that??
loove;
Copyright Information
Copyright © Codenstuff.com 2020 - 2023