by Ts Bhusal (3 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 17th March 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Shows Progressbar to work something in Backgroud
API Declarations
'Place a ProgressBar in a form
'Place a Label labeled a Percent (%) sign
'place a label named lblPercent
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