Download as pdf or txt
Download as pdf or txt
You are on page 1of 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