Saturday, 6 August 2011

(Dot net factory) Now put ProgressBar into windows form using the following class


Set MyProgressBar = DotNetFactory.CreateInstance("System.Windows.Forms.ProgressBar", "System.Windows.Forms")

Now we are applying progress bar in the windows form

Set MyForm = DotNetFactory.CreateInstance("System.Windows.Forms.Form", "System.Windows.Forms")
Set MyProgressBar = DotNetFactory.CreateInstance("System.Windows.Forms.ProgressBar", "System.Windows.Forms")
Set Pos = DotNetFactory.CreateInstance("System.Drawing.Point", "System.Drawing")
Pos.X = 100
Pos.Y = 100
With MyProgressBar
.Maximum = 100
.Minimum = 0
.Step = 20
.Location = Pos
End with
MyForm.Controls.Add MyProgressBar
MyForm.Show
For i = 0 to 5
MyProgressBar.PerformStep()
Next
MyForm.Close


No comments:

Post a Comment