Krijimi i Progres Barit ne Visual Basik
'No Declarations
'Place a ProgressBar in a form
'Place a Label labeled a Percent (%) sign
'place a label named lblPercent
Private Sub Form_Load()
mdiMain.Enabled = False
End Sub
Private Sub Timer1_Timer()
On Error GoTo F:
Screen.MousePointer = vbHourglass
With ProgressBar1
.Value = .Value + 1
lblPercent.Caption = .Value
End With
Exit Sub
F:
If Err.Number = 380 Then
'the following are the functions
'that I have to work in Background
'You may add other code here as per your need
With mdiMain
.mnuPerform.Enabled = False
.mnuModify.Enabled = False
.mnuReport.Enabled = False
.mnuOffices.Enabled = False
.mnuPersonal.Enabled = False
.mnuOfficial.Enabled = False
.mnuBackup.Enabled = False
.mnuReinstate.Enabled = False
.mnuUpdate.Enabled = False
.mnuLogOff.Caption = "Log on"
Screen.MousePointer = vbNormal
End With
Unload Me
mdiMain.Enabled = True
End If
End Sub