gotdamojo06 Posted November 3, 2003 Posted November 3, 2003 What is the code for a single progress bar? I want to have a progressbar on one of the forms i have in my program. Thank you. Also how do i open a .exe file when a button is pushed? Thanks for the help. Email me, IM me, private message me, or just reply to this post if u know wat to do! thanks Quote
*Experts* Volte Posted November 3, 2003 *Experts* Posted November 3, 2003 1) Put a ProgressBar control on your form. It's in the toolbox. 2)Process.Start("C:\myfile.exe") Quote
gotdamojo06 Posted November 4, 2003 Author Posted November 4, 2003 Hey thanks, but it dont work. like what is the code for the progressbar? thats what i dont know how to do. thanks with the process.start. how do u do that under vb 6.0? Quote
*Experts* Volte Posted November 4, 2003 *Experts* Posted November 4, 2003 What do you mean what is the code? You could do this:Dim pb As New ProgressBar() pb.Location = New Point(10, 10) pb.Size = New Size(300, 15) pb.Max = 100 pb.Min = 1 Me.Controls(pb)To add the control manually. I still don't know exactly what you mean though. BTW, Use Shell under VB6. Quote
gotdamojo06 Posted November 4, 2003 Author Posted November 4, 2003 ok what i mean is i have the form. there is only the progress bar on it rite now. the properties have not been changed. What do i do to make the progressbar have the blue things move? Quote
*Experts* Volte Posted November 4, 2003 *Experts* Posted November 4, 2003 Set the Value property. Quote
gotdamojo06 Posted November 4, 2003 Author Posted November 4, 2003 what do u mean? dose it automatically move? Quote
*Experts* Volte Posted November 4, 2003 *Experts* Posted November 4, 2003 Yes. When you set the Value property. Quote
gotdamojo06 Posted November 4, 2003 Author Posted November 4, 2003 what i want it to do, is to make it look like it is installing something. have it move like it dose when you instal lets say, aol instant messanger. I dont want it to do anything but look like it is installing something Quote
*Experts* Volte Posted November 4, 2003 *Experts* Posted November 4, 2003 So change the Value property, and the progress bar (the "blue things") will move. Quote
gotdamojo06 Posted November 4, 2003 Author Posted November 4, 2003 will they move automatically when i run the program tho? Quote
gotdamojo06 Posted November 4, 2003 Author Posted November 4, 2003 do i need to put some kind of code under a timer? or what? Quote
*Experts* Volte Posted November 4, 2003 *Experts* Posted November 4, 2003 I see what you mean now. D'oh. Yes, you need to put the code to increase the Value property in a Timer. Quote
gotdamojo06 Posted November 4, 2003 Author Posted November 4, 2003 what would the code look like? put this under timer1 pb.value=pb.value+10 pb.value=pb.value+10 pb.value=pb.value+10 pb.value=pb.value+10 pb.value=pb.value+10 pb.value=pb.value+10 pb.value=pb.value+10 pb.value=pb.value+10 pb.value=pb.value+10 pb.value=pb.value+10 Is that wat i do? or not? Quote
Administrators PlausiblyDamp Posted November 4, 2003 Administrators Posted November 4, 2003 just put it once - all your sample is doing is adding 100 to the value. something like if pb.Value + 10 < pb.Maximum pb.Value += 10 else pb.Value = pb.Maximum end if should do the trick Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
SamM Posted April 28, 2004 Posted April 28, 2004 Progressbar Hey guys, sorry to dig up such a old thread, but I am currently trying to incorporate a progress bar into my splash screen of my project. I can get the progress bar to execute fine but I want to slow down the rate of the bars displaying on the progress bar. I'm basically trying to provide the look of user authentication with the progress bar. Any feedback would be appriciated. This is what I'm using for my code Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If (Me.ProgressBar1.Value > 0) Then Me.ProgressBar1.Value -= 1 Else Me.Timer1.Enabled = False End If End Sub Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click Me.ProgressBar1.Value = 100 Me.Timer1.Interval = 1 Me.Timer1.Enabled = True End Sub Quote
wessamzeidan Posted April 28, 2004 Posted April 28, 2004 Slow down the timer, increase the interval of the timer Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.