Results 1 to 8 of 8

Thread: Form that shows loading bar

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    13

    Form that shows loading bar

    how would i go about making a preload form that displays a loading bar and then loads the main mdi form after its finished...? here is an example


  2. #2
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,748

    Re: Form that shows loading bar

    use splash screen form and a timer and a progress bar
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  3. #3
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,748

    Re: Form that shows loading bar

    I have attached a working copy. I hope this will help you and if you receive an answer to your question do take time to rate this post.


    EDIT: I uploaded a working copy now.
    Attached Files Attached Files
    Last edited by Simply Me; Aug 8th, 2006 at 12:25 AM.
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  4. #4

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    13

    Re: Form that shows loading bar

    i get a bunch of errors when i try to load the project... when i open the prject file it says it cant find the form..


    Edit:
    never mind i got it to work but...

    1) how do I add a progress bar (which component?)

    2) how would i load the progress bar on the progress of the actual program loading rather than just a timer?
    Last edited by Prophet-; Jul 14th, 2006 at 01:54 PM.

  5. #5
    Addicted Member
    Join Date
    Apr 2006
    Posts
    155

    Re: Form that shows loading bar

    Quote Originally Posted by Prophet-
    i get a bunch of errors when i try to load the project... when i open the prject file it says it cant find the form..


    Edit:
    never mind i got it to work but...

    1) how do I add a progress bar (which component?)

    2) how would i load the progress bar on the progress of the actual program loading rather than just a timer?
    1. Use the component (Project -> Components), 'Microsoft Window Common Controls 5.0 (SP2)'

    2. I don't really get what you're trying to ask , but you can use the Progressbar with the timer and setup steps of each load like this:

    VB Code:
    1. 'add a timer named: Timer1
    2. 'add a progressbar named: ProgressBar1
    3.  
    4.  Private Sub Form_Load()
    5.   Timer1.Enabled = True
    6.   Timer1.Interval = 500 '1/2 of a second
    7.     ProgressBar1.Value = 0
    8.      Me.Caption = "Loading..."
    9.  End Sub
    10. '
    11.  Private Sub Timer1_Timer()
    12.   Dim num As Long
    13.    Select Case num&
    14.     Case 0
    15.        ProgressBar1.Value = ProgressBar1.Value + 10
    16.      'load some stuff
    17.     Case 1
    18.        ProgressBar1.Value = ProgressBar1.Value + 10
    19.      'load some stuff
    20.     Case 2
    21.        ProgressBar1.Value = ProgressBar1.Value + 10
    22.      '...etc, etc
    23.     Case 3
    24.      'last case , unload, goto mdi form
    25.        Unload Me
    26.          MDIForm1.Show
    27.    End Select
    28.     num& = num& + 1
    29.  End Sub

    This is one way , of course theres other ways (some) much more sophisticated.

  6. #6
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: Form that shows loading bar

    the very simple example would be New Project->VB Application Wizard->Multiple Document Interface and Include Splash Screen at application startup when prompted...
    that splash screen will be stayed only during the loading process without the timer...
    As far as the progress bar is concerned you have to include the coding to increase the value of it till your project gets fully loaded...ie. your main form's loading time...
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  7. #7
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Form that shows loading bar

    Quote Originally Posted by Simply Me
    I have attached a working copy. I hope this will help you and if you receive an answer to your question do take time to rate this post.
    error loading project ...

  8. #8
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,748

    Re: Form that shows loading bar

    Quote Originally Posted by rory
    error loading project ...

    Checked my previous attachment. Its now working. thanks for pointing that out rory.
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width