VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Shows Progressbar to work something in Backgroud

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

Rate Shows Progressbar to work something in Backgroud



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


Download this snippet    Add to My Saved Code

Shows Progressbar to work something in Backgroud Comments

No comments have been posted about Shows Progressbar to work something in Backgroud. Why not be the first to post a comment about Shows Progressbar to work something in Backgroud.

Post your comment

Subject:
Message:
0/1000 characters