How to make a Loading bar??

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Jul 2007
Posts: 102
Reputation: hawisme000 is an unknown quantity at this point 
Solved Threads: 2
hawisme000's Avatar
hawisme000 hawisme000 is offline Offline
Junior Poster

How to make a Loading bar??

 
0
  #1
Oct 24th, 2007
can any1 help me use a progress bar(if im not mistaken)

i wanna put a loading bar in my login form

but i dont know the syntax i must put

thx in advance to any1 who can help
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 3
Reputation: td5223 is an unknown quantity at this point 
Solved Threads: 1
td5223 td5223 is offline Offline
Newbie Poster

Re: How to make a Loading bar??

 
0
  #2
Oct 24th, 2007
Go to Components - Controls and add "Microsoft Windows Common Controls" to your project. Then the progressbar should appear in your list of components. Then select the progressbar and create it on your form. The value can be set something like mainform.progressbar1.value = 50.... (0-100)
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 570
Reputation: ryan_vietnow is an unknown quantity at this point 
Solved Threads: 71
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

Re: How to make a Loading bar??

 
0
  #3
Oct 24th, 2007
add a timer and a progress bar to your form.
set the progressbar1.max(or maximum i think) to 100,value to 0.
set the timer1.enabled=false

type this inside the timer event:

If ProgressBar1.Value <> ProgressBar1.Max Then
ProgressBar1.Value = (ProgressBar1.Value + 1)
else
frmlogin.hide(or Unload frmlogin)
frmMain.Show
me.enabled=0
End If

then type this after the user successfully logged:
timer1.enabled=1

*change the progressbar1.interval if how fast or slow you progress bar should be.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 11
Reputation: jayDC is an unknown quantity at this point 
Solved Threads: 0
jayDC jayDC is offline Offline
Newbie Poster

Re: How to make a Loading bar??

 
0
  #4
Dec 15th, 2007
I have this in my code
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub mnuOpen_Click()
  2. Dim result As FMOD_RESULT
  3. Dim cD As New cCommonDialog
  4. If channel Then
  5. Call FMOD_Channel_Stop(channel)
  6. End If
  7. Timer1.Enabled = 1
  8. On Error GoTo ErrorHandler
  9. If (cD.VBGetOpenFileName(sFile, Filter:="Wave Files (*.WAV)|*.WAV|All Files (*.*)|*.*", _
  10. DefaultExt:="WAV", Owner:=Me.Hwnd)) Then
  11. Timer1.Enabled = 1
  12. result = FMOD_System_CreateSound(system, sFile, FMOD_SOFTWARE, Sound)
  13. ERRCHECK (result)
  14. result = FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, Sound, 0, channel)
  15. ERRCHECK (result)
  16. result = FMOD_Channel_SetPaused(channel, 1)
  17. vbalWaveRender1.WaveFile = sFile
  18. End If
  19. Exit Sub
  20. ErrorHandler:
  21. MsgBox "Error: " & Err.description, vbExclamation
  22. Exit Sub
  23. End Sub
Seem to make the progress after the files load, and that really ain't the progress. Anyway to adjust it to be more accurate, should I move the file loading events to the timer to be executed during the progress bar?
If at first you don't succeed, don't try skydiving!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC