I use visual studio 8.0
Two forms:
windows form => form1.vb
windows dialog form => ProcesDialog.vb
On the procesDiaglog are five label fields:
label1
label2
label3
label4
label5
Two picture fields
picture1
picture2
I want to show the progress of building a Windows form1
I would always show the progress in procesdiaglog
Problem is that Form1 does not become visible and procesdiaglog remains a blank screen (see Annex).
Form1 is so called: form1.show
For more information, see code from form1.vb.
Public Sub New()
' This call is required by the Windows Form Designer.
' Add any initialization after the InitializeComponent() call.
' This call is required by the Windows Form Designer.
InitializeComponent()
ProcesDialog.Show()
ProcesDialog.ProgressBar1.PerformStep()
ProcesDialog.Label1.Text = "fase 1"
ProcesDialog.Label2.Text = 0
ProcesDialog.Label3.Text = "Percentage completed" & Int(ProcesDialog.ProgressBar1.Value * 100 / ProcesDialog.ProgressBar1.Maximum) & "%"
For i = 1 To 1000000000
If i = 10000 Then
ProcesDialog.ProgressBar1.PerformStep()
ProcesDialog.Label1.Text = "fase 2"
ProcesDialog.Label2.Text = i
ProcesDialog.Label3.Text = "Percentage completed" & Int(ProcesDialog.ProgressBar1.Value * 100 / ProcesDialog.ProgressBar1.Maximum) & "%"
Me.Refresh()
End If
If i = 100000 Then
ProcesDialog.ProgressBar1.PerformStep()
ProcesDialog.Label1.Text = "fase 3"
ProcesDialog.Label2.Text = i
ProcesDialog.Label3.Text = "Percentage completed" & Int(ProcesDialog.ProgressBar1.Value * 100 / ProcesDialog.ProgressBar1.Maximum) & "%"
End If
If i = 7000000 Then
ProcesDialog.ProgressBar1.PerformStep()
ProcesDialog.Label1.Text = "fase 4"
ProcesDialog.Label2.Text = i
ProcesDialog.Label3.Text = "Percentage completed" & Int(ProcesDialog.ProgressBar1.Value * 100 / ProcesDialog.ProgressBar1.Maximum) & "%"
End If
Next
'Here Here comes the rest of the code ......
end sub
Thanks for the reply,
André