Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 331
  • Last Modified:

progresive bar vb 2005

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
demoniumz
Asked:
demoniumz
  • 12
  • 5
  • 3
1 Solution
 
demoniumzAuthor Commented:
sorry progress bar i mean
0
 
demoniumzAuthor Commented:
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
 
jpaulinoCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
jpaulinoCommented:
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
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
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
 
demoniumzAuthor Commented:
Marquee mode ? how to put like this?
0
 
jpaulinoCommented:
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
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
If you want to do it at design-time in the IDE:
ProgressBarMarqueeStyle.jpg
0
 
demoniumzAuthor Commented:
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
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
What are you trying to do with the Click() Event?  You want the user to Click on the ProgressBar and then what?   huh?....
0
 
demoniumzAuthor Commented:
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
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
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
 
demoniumzAuthor Commented:
i remove code i set style to  marquee i see the progress bar but nothing move  inside
0
 
demoniumzAuthor Commented:
??????why happend these
0
 
demoniumzAuthor Commented:
:Idle_Mind can u help
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
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
 
demoniumzAuthor Commented:


        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
 
demoniumzAuthor Commented:
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
 
demoniumzAuthor Commented:
double check  work  but in my splash screen  not:P i thing is  a bad day
0
 
demoniumzAuthor Commented:
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 12
  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now