Private Sub Annuler_Click()
flag = 1
End Sub
Private Sub Installer_Click()
DoEvents
Bar_Progress.Label3.Visible = True
Bar_Progress.Label3.Caption = "Installation de Windows Seven en cours, veuillez patientez..."
Dim Total1, Total2, x, y As Long
Dim MonTimer As Double
Total1 = 100 'Pourcentage progression
Total2 = 900 'Vitesse de progression
For x = 1 To Total1
For y = 1 To Total2
If flag = 1 Then
Exit Sub
End If
MonTimer = Timer
Me.TextBox4.Width = (y / Total2) * 202
Me.Label2.Caption = "Progression: " & y & " of " & Total2
DoEvents
Next y
Me.TextBox2.Width = (x / Total1) * 202
Me.Label1.Caption = "Chargement éffectué à: " & x & "%" & " ..."
Next x
Me.Label3.Caption = "L'installation de Windows est terminée." & vbCr & "Veuillez redémarrer l'ordinateur."
Me.Label1.Visible = False
End Sub
Private Sub UserForm_Activate()
Application.Cursor = xlWait
Bar_Progress.MousePointer = fmMousePointerHourGlass
DoEvents
Application.Cursor = xlDefault
Bar_Progress.MousePointer = fmMousePointerDefault
End Sub
Private Sub UserForm_Initialize()
Me.TextBox2.Left = Me.TextBox1.Left
Me.TextBox2.Top = Me.TextBox1.Top + 3
Me.TextBox4.Left = Me.TextBox3.Left
Me.TextBox4.Top = Me.TextBox3.Top + 3
Me.TextBox2.Width = 0
Me.TextBox4.Width = 0
Label3.Caption = "Installation de Windows Seven en cours, veuillez patientez..."
Me.Label3.Visible = False
End Sub