this is something very cool by the way i am using images , if you know adobe flash player updater else here is a picture of the adobe flash updater progressbar
ok lets get started just create a new project and download this files and add them to the resources and now add a picturebox and rename to pbback select picture box 1 backgroundimage from properties and select pb4 image from resources and now add a timer and set the interval to 100 and make the timer enabled = true you can change the timer interval for your needs if you want and now add a button two buttons from the toolbox , button one is to start the progressbar and button two is to reset the progressbar , add two pictureboxes and change the size to 2, 31 and rename one to pbright and the other one to pbleft now place the pbright on the right side of the picturebox1 and place the pbleft on the left side of the picturebox1
now fix pbleft and pbright with pbback
at last time for some coding double click your form and add these code below
debug and enjoy
i got to know there are many problems in this tutorial so you can download the source code of this program below
ok lets get started just create a new project and download this files and add them to the resources and now add a picturebox and rename to pbback select picture box 1 backgroundimage from properties and select pb4 image from resources and now add a timer and set the interval to 100 and make the timer enabled = true you can change the timer interval for your needs if you want and now add a button two buttons from the toolbox , button one is to start the progressbar and button two is to reset the progressbar , add two pictureboxes and change the size to 2, 31 and rename one to pbright and the other one to pbleft now place the pbright on the right side of the picturebox1 and place the pbleft on the left side of the picturebox1
now fix pbleft and pbright with pbback
at last time for some coding double click your form and add these code below
Public Class Form1 'Author : Mohamed Shimran 'Blog : http://www.ultimateprogrammingtutorials.blogspot.com Public Function pbreset() pbblue.Width = "0" pbright.Image = My.Resources.pbar1nblue pbleft.Image = My.Resources.pbar3nblue Return Nothing End Function Public Function pbarinc(ByVal increment As Integer) pbleft.Image = My.Resources.pbar1 If pbblue.Width >= pbback.Width - increment Then pbblue.Width = pbback.Width pbright.Image = My.Resources.pbar3 Else pbblue.Width += increment End If Return Nothing End Function 'END OF NOT BEING ABLE TO EDIT 'YOU CAN EDIT FROM NOW Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Timer1.Start() End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick 'incrementing the progress bar change the '10' to any number pbarinc(10) 'this is kind of saying if the progressbar is full execute some code. If pbblue.Width >= pbback.Width Then 'this will execute the code before it shuts the timer off Timer1.Stop() End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click pbreset() End Sub End Classthe code is explained well
debug and enjoy
i got to know there are many problems in this tutorial so you can download the source code of this program below
2 comments
can you tell me how about the pbblue? you didnt eplain well thanks
Replypbblue is a picturebox and it is the blue color progress that moves when you click start
ReplyMe.pbblue.BackgroundImage = Global.WindowsApplication2.My.Resources.Resources.pbar2
Me.pbblue.Location = New System.Drawing.Point(13, 11)
Me.pbblue.Name = "pbblue"
Me.pbblue.Size = New System.Drawing.Size(0, 31)
Me.pbblue.TabIndex = 2
Me.pbblue.TabStop = False
-shim
Post a Comment
Note: Only a member of this blog may post a comment.