0% found this document useful (0 votes)
33 views2 pages

Print Command

The document discusses using Visual Basic .NET to create a progress bar and multiple forms. It includes code snippets to add controls like timers, progress bars and link labels and transition between forms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

Print Command

The document discusses using Visual Basic .NET to create a progress bar and multiple forms. It includes code snippets to add controls like timers, progress bars and link labels and transition between forms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Print Command

Public Class Form1

Private Sub cmdRun_Click(ByVal sender


As System.Object, ByVal e As
System.EventArgs) Handles cmdRun.Click
Dim a As Integer
a = 1
While a < 10
a = a + 1
lstPrint.Items.Add("Hellow
World")

End While

End Sub

End Class

Create a progress bar

Add second form

Public Class Form1

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Timer1.Tick
If ProgressBar1.Value > 0 Then
Me.Hide()
Form2.Show()
Timer1.Enabled = False
End If
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
Timer1.Interval = 1000
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = 100
ProgressBar1.Value = 100
End Sub
End Class
ADD 2 timer controls and Form 02

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
Timer1.Interval = 200
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Timer1.Tick
lblstd.ForeColor = Color.FromArgb(246 * Rnd(), 235 * Rnd(),
214 * Rnd(), 212 * Rnd())
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object,
ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles
LinkLabel1.LinkClicked
Me.Hide()
Form2.Show()
End Sub

You might also like