Creating Form Loding With Visual Basic .NET

Form Loading is usually used when opening the application or after inputting the Login form data or when loading certain forms (depending on needs)

Here are the steps to create a Loading form with VB .NET.

Please create a project with Visual Basic .NET
Make two forms (minimum 2 forms)
2 The form here, 1 is used for form loading and the other is used for form after loading.
So the running of the application is, when the Project is run, the loading form will appear, then when the loading is complete, form2 will appear.
Later, if you have succeeded, you can use the VB .NET application that you created.

Cara Membuat Form Loding Dengan Visual Basic .NET
In Form1 above, please create a form like the one above:
Inputs: Label1, ProgressBar1, and Timer1

In order for a better view, please click Form1
Then in Properties, on the BorderStyle form, please select None
The picture is as follows:
Cara Membuat Form Loding Dengan Visual Basic .NET
dan Berikut Hasilnya :
Cara Membuat Form Loding Dengan Visual Basic .NET
Then please enter the code below on Form1:
Public Class Form1

Private Sub Form1_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Increment(1)
Label1.Text = ProgressBar1.Value & ("%")
If ProgressBar1.Value = 100 Then
Me.Hide()
Form2.Show()
Timer1.Stop()

End If
End Sub
End Class

Please Save and Run your Project.
For Form2 you don't need to give coding, form2 will appear when loading is complete or it is 100 percent.

Subscribe to receive free email updates:

Related Posts :

0 Response to "Creating Form Loding With Visual Basic .NET"

Post a Comment