Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

progresive bar vb 2005

Posted on 2009-04-10
20
321 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

839 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