Micro Gui
Micro Gui
On
VB.NET stands for Visual Basic.NET, and it's a programming language developed by
Microsoft. it absolutely was initial free in 2002 to exchange Visual Basic vi. VB.NET is
associate object-oriented artificial language. this suggests that it supports the options of
object-oriented programming that embrace encapsulation, polymorphism, abstraction,
and inheritance. Visual Basic .ASP web runs on the .NET framework, which suggests
that it's full access to the .NET libraries. it's a really productive tool for speedy creation
of a good vary of net, Windows, Office, and Mobile applications that are engineered on
the .NET framework. The language was designed in such the simplest way that it's
simple to grasp to each novice and advanced programmers. Since VB.NET depends on
the .NET framework, programs written within the language run with a lot of
responsibleness and measurability. With VB.NET, you'll produce applications that
square measure totally object-oriented, kind of like those created in alternative
languages like C++, Java, or C#. Programs written in VB.NET can even interoperate
well with programs written in Visual C++, Visual C#, and Visual J#. VB.NET treats
everything as associate object.
Feature of Vb.Net :
VB.NET comes loaded with various options that have created it a preferred
programing language amongst programmers worldwide. These options embrace the
following:
• VB.NET isn't case sensitive like different languages like C++ and Java.
• It is associate degree object-oriented programing language. It treats everything as
associate degree object.
• Automatic code format, XML designer, improved object browser etc.
• Garbage assortment is machine-driven.
• Support for mathematician conditions for deciding.
• Simple multithreading, permitting your apps to cope with multiple tasks at the same
time.
• A customary library.
• Events management.
• References. you ought to reference associate degree external object that's to be
employed in a VB.NET application.
• Attributes, that square measure tags for providing further info relating to parts that are
outlined inside a program.
• Windows Forms- you'll be able to inherit your kind from associate degree already
existing kind.
Advantages of Vb.net:-
The following square measure the pros/benefits you may relish for writing in
VB.NET:
• Your code are going to be formatted mechanically.
• You can use object-oriented constructs to make Associate in Nursing enterprise-class
code.
• You will produce internet applications with fashionable options like performance
counters, event logs, and filing system.
• You will produce your internet forms with abundant ease through the visual forms
designer. you may additionally relish drag and drop capability to switch any components
that you simply may have.
• You will connect your applications to alternative applications created in languages that
run on the .NET framework.
• You can relish options like tying up, automatic management anchoring, and in-place
menu editor all smart for developing internet applications.
Button : The Button management represents a regular Windows button. it's usually
wont to generate a Clickevent by providing a handler for the clicking event.
Code:-
speed = 3
road(0) = PictureBox1
road(1) = PictureBox2
road(2) = PictureBox3
road(3) = PictureBox4
road(4) = PictureBox5
road(5) = PictureBox6
road(6) = PictureBox7
road(7) = PictureBox8
End Sub
Private Sub roadmover_Tick(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles roadmover.Tick
For x As Integer = 0 To 7
road(x).Top += 2
road(x).Top = -road(x).Height
End If
Next
If (car.Bounds.IntersectsWith(enemycar1.Bounds)) Then
gameover()
End If
If (car.Bounds.IntersectsWith(enemycar3.Bounds)) Then
gameover()
End If
If (car.Bounds.IntersectsWith(enemycar4.Bounds)) Then
gameover()
End If
If (car.Bounds.IntersectsWith(enemycar6.Bounds)) Then
gameover()
End If
End Sub
Replay_button.Visible = True
endtext.Visible = True
roadmover.Stop()
enemy1_mover.Stop()
enemy3_mover.Stop()
enemy4_mover.Stop()
enemy6_mover.Stop()
End Sub
rightmover.Start()
End If
leftmover.Start()
End If
End Sub
car.Left += 5
End Sub
car.Left -= 5
End Sub
rightmover.Stop()
leftmover.Stop()
End Sub
enemycar1.Top += 3
If enemycar1.Top >= Me.Height Then
score = score + 1
End If
End Sub
enemycar3.Top += 3.5
score = score + 1
End If
End Sub
score = score + 1
End If
End Sub
enemycar6.Top += 4.5
End If
End Sub
score = 0
Me.Controls.Clear()
InitializeComponent()
form1_load(e, e)
End Sub
End Class
Output:-
conclusion
by using this project as demo you can create your own micro project.