Solved

progresive bar vb 2005

Posted on 2009-04-10
20
314 Views
Last Modified: 2013-12-26
hello i make a splash screen and i insert a progresive bar (like winxp boot screen) i want to make the screen works  can i make it loading ? until the splash screen disappear (i use timer) vb 2005
0
Comment
Question by:demoniumz
  • 12
  • 5
  • 3
20 Comments
 
LVL 1

Author Comment

by:demoniumz
ID: 24114642
sorry progress bar i mean
0
 
LVL 1

Author Comment

by:demoniumz
ID: 24114869
i write a small code  for progress bar  but  i dont see the  progress bar loaded only is move to login form why can someone check it and corect me pls
Public NotInheritable Class Nicolaou

    Dim i As Integer

    'TODO: This form can easily be set as the splash screen for the application by going to the "Application" tab

    '  of the Project Designer ("Properties" under the "Project" menu).
 
 

    Private Sub Nicolaou_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        'Set up the dialog text at runtime according to the application's assembly information.  
 

        'TODO: Customize the application's assembly information in the "Application" pane of the project 

        '  properties dialog (under the "Project" menu).
 

        'Application title

        If My.Application.Info.Title <> "" Then
 

        Else

            'If the application title is missing, use the application name, without the extension
 

        End If
 

        'Format the version information using the text set into the Version control at design time as the

        '  formatting string.  This allows for effective localization if desired.

        '  Build and revision information could be included by using the following code and changing the 

        '  Version control's designtime text to "Version {0}.{1:00}.{2}.{3}" or something similar.  See

        '  String.Format() in Help for more information.

        '

        '    Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision)
 
 
 
 

        'Copyright info

        Timer.Interval = 5000

        Timer.Start()

    End Sub
 

    Private Sub Timer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer.Tick

        Timer.Stop()

        Me.Hide()

        NicolaouLogin.Show()
 

    End Sub
 
 

    Private Sub ProgressBar1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
 

    End Sub
 

    Private Sub ProgressBar1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProgressBar1.Click

        ProgressBar1.Maximum = 50000

        ProgressBar1.Minimum = 0

        For i = 0 To ProgressBar1.Maximum

            ProgressBar1.Value = i

            If ProgressBar1.Value = ProgressBar1.Maximum Then

                Timer.Enabled = False

                Me.Hide()

            End If

        Next
 

    End Sub

End Class

Open in new window

0
 
LVL 48

Expert Comment

by:jpaulino
ID: 24115114
But where do you want to put the progressbar ?
The progress bar is to show the end user the progress that some operation it takes. Since you don't have any heavy steps to do you just want to simulate a load ?
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 24115189
Here's how it works
 

        Me.ProgressBar1.Maximum = 10

        Me.ProgressBar1.Minimum = 0

        Me.ProgressBar1.Value = 0
 

        ' Do some work

        Me.ProgressBar1.Value = 1 ' or Me.ProgressBar1.PerformStep()

        Me.ProgressBar1.Update()
 

        ' Do some more work

        Me.ProgressBar1.Value = 2 ' or Me.ProgressBar1.PerformStep()

        Me.ProgressBar1.Update()
 

        ' Do some more work

        Me.ProgressBar1.Value = 3 ' or Me.ProgressBar1.PerformStep()

        Me.ProgressBar1.Update()
 

        ' Until the end of the processes

Open in new window

0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 24116325
Put the ProgressBar into Marquee mode and it will move continously to show an ongoing operation:

    ProgressBar1.Style = ProgressBarStyle.Marquee

It looks something like this:

ProgressBarMarquee.tga.jpg
0
 
LVL 1

Author Comment

by:demoniumz
ID: 24118156
Marquee mode ? how to put like this?
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 24118178
If you define as marquee it will always be running from left to right and right to left.
Idle_Mind already showed you how to put like that!
 
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 24118329
If you want to do it at design-time in the IDE:
ProgressBarMarqueeStyle.jpg
0
 
LVL 1

Author Comment

by:demoniumz
ID: 24118351
i insert  my progressbar from the toolbox  the code but nothing happend

Private Sub ProgressBar1_Click_2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProgressBar1.Click
        ProgressBar1.Style = ProgressBarStyle.Marquee
    End Sub
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 24118410
What are you trying to do with the Click() Event?  You want the user to Click on the ProgressBar and then what?   huh?....
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Author Comment

by:demoniumz
ID: 24118479
i am new on vb so  do be mad with me idle mind i have a splash screen  and that i want is:At the time the aplication start and splash screen   appears  by the end of the splash scree close and login form show i want the progress bar to  move continewsly. thnks
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 24118529
Lol...I'm not mad at ya bud...just trying to figure out what you're doing!  =)

You don't need any code to make the ProgressBar move continuously in Marquee mode.  Just select the ProgressBar and then down in the bottom right (by default) will be the Properties Pane (see image above).  Find the Style entry and change it to Marquee.  Now then the form shows the ProgressBar should already be moving by itself!

I would get rid of any code involving the ProgressBar and the Click() event...
0
 
LVL 1

Author Comment

by:demoniumz
ID: 24118568
i remove code i set style to  marquee i see the progress bar but nothing move  inside
0
 
LVL 1

Author Comment

by:demoniumz
ID: 24118728
??????why happend these
0
 
LVL 1

Author Comment

by:demoniumz
ID: 24118843
:Idle_Mind can u help
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 24118931
Sorry...was eating lunch w/ the kids.

So your splash form displays properly and is visible during the "loading" process but the ProgressBar doesn't move?  How long is your splash form visible on screen?  What are you loading?...and how?  Are you keeping the splash form visible for a minimum amount of time?  If so, then how?
0
 
LVL 1

Author Comment

by:demoniumz
ID: 24119111


        Timer.Interval = 5000
        Timer.Start()

    End Sub

    Private Sub Timer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer.Tick
        Timer.Stop()
        Me.Hide()
        NicolaouLogin.Show()

    End Sub

in a form  the progress bar  run perfect in the splash screen  not run nothing :)
0
 
LVL 1

Author Comment

by:demoniumz
ID: 24119166
using splash screen progrsive bar visible but nothing move  splash  screen  visible
        Timer.Interval = 5000
        Timer.Start()
i am  just  loading  nothing fake loading just needed to be there for a project
0
 
LVL 1

Author Comment

by:demoniumz
ID: 24119234
double check  work  but in my splash screen  not:P i thing is  a bad day
0
 
LVL 1

Author Closing Comment

by:demoniumz
ID: 31568858
finally i remake the splash screen and work maybe is a bug maybe somthing goes wrong result work thnks very much appreciate that man :)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now