Click here to Skip to main content
16,005,149 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Testing if a varible is null Pin
DaveAuld4-Feb-10 5:15
professionalDaveAuld4-Feb-10 5:15 
GeneralRe: Testing if a varible is null Pin
Luc Pattyn4-Feb-10 5:36
sitebuilderLuc Pattyn4-Feb-10 5:36 
GeneralRe: Testing if a varible is null Pin
DaveAuld4-Feb-10 6:14
professionalDaveAuld4-Feb-10 6:14 
GeneralRe: Testing if a varible is null Pin
Luc Pattyn4-Feb-10 6:18
sitebuilderLuc Pattyn4-Feb-10 6:18 
GeneralRe: Testing if a varible is null Pin
EliottA4-Feb-10 7:26
EliottA4-Feb-10 7:26 
AnswerRe: Testing if a varible is null Pin
RachelSo4-Feb-10 8:08
RachelSo4-Feb-10 8:08 
GeneralRe: Testing if a varible is null Pin
Thomas Krojer4-Feb-10 21:47
Thomas Krojer4-Feb-10 21:47 
QuestionHow do I update a progress bar that I create at runtime. Pin
castingflame3-Feb-10 7:16
castingflame3-Feb-10 7:16 
If the designer creates a progressbar it does this

Me.ProgressBar1 = New System.Windows.Forms.ProgressBar


and a bit further down

'ProgressBar1
        '
        Me.ProgressBar1.Location = New System.Drawing.Point(630, 181)
        Me.ProgressBar1.Name = "ProgressBar1"
        Me.ProgressBar1.Size = New System.Drawing.Size(453, 23)
        Me.ProgressBar1.Step = 1
        Me.ProgressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee
        Me.ProgressBar1.TabIndex = 54



If I want to increment the progressbar at runtime I just do this

Progressbar1.Value = Progressbar1.Value + 1



Is the word Progressbar1 that is used to access the .value assigned by the .name or is it from the Me.ProgressBar1 = New System.Windows.Forms.ProgressBar assignment?

I have created some controls that include progress bars that are created at runtime by going through a dataset. Each record has a name field and I create a progress bar for every record using the record name as the progressbars.name property


This is some of my code:



Dim progName(RobotRecordsCount) As ProgressBar
Dim myLoop as integer

 For myLoop = 0 To (RobotRecordsCount - 1)

            currentName = (Mafia_Wars_ManagerDataSet.Robots(myLoop).Name)


  'Create a progressbar
  
          progName(myLoop) = New ProgressBar()
            progName(myLoop).Location = New Drawing.Point(ProgBarPosVer, lblposHoz)   'lblposVer, ProgBarPosHoz)
            progName(myLoop).Name = "Prog" + currentName
            progName(myLoop).Width = 300
            progName(myLoop).Height = 20
            progName(myLoop).Minimum = 0
            progName(myLoop).Maximum = 30
            TabControl1.TabPages(0).Controls.Add(progName(myLoop))



How do I then do the equiv of

progName???.Value = progName???.Value + 1



1. I am confused how to update it after it has been created

2. As it is created at runtime how will intellisense know it exists without complaining (is this called late binding)?




I know that this is probably a fundamentals question so i'm sorry if it bugs you trying to run before i can walk. I am obviously lacking in foundation so I have ordered some books to rectify this.


Again thankyou for your previous response. I have been working and learning for 3 weeks without reulting to asking questions but I seem to have hit a wall.
AnswerRe: How do I update a progress bar that I create at runtime. Pin
Luc Pattyn3-Feb-10 7:37
sitebuilderLuc Pattyn3-Feb-10 7:37 
AnswerRe: How do I update a progress bar that I create at runtime. Pin
William Winner4-Feb-10 7:23
William Winner4-Feb-10 7:23 
GeneralRe: How do I update a progress bar that I create at runtime. Pin
David Skelly4-Feb-10 22:34
David Skelly4-Feb-10 22:34 
QuestionSchema.Add returns Illegal characters in path. Pin
c_crookston3-Feb-10 6:16
c_crookston3-Feb-10 6:16 
AnswerRe: Schema.Add returns Illegal characters in path. Pin
c_crookston3-Feb-10 6:29
c_crookston3-Feb-10 6:29 
QuestionCan not set the name property of a timer at runtime - VB.NET Pin
castingflame3-Feb-10 2:07
castingflame3-Feb-10 2:07 
AnswerRe: Can not set the name property of a timer at runtime - VB.NET Pin
Covean3-Feb-10 2:34
Covean3-Feb-10 2:34 
AnswerRe: Can not set the name property of a timer at runtime - VB.NET Pin
Luc Pattyn3-Feb-10 2:34
sitebuilderLuc Pattyn3-Feb-10 2:34 
AnswerRe: Can not set the name property of a timer at runtime - VB.NET Pin
DaveAuld3-Feb-10 2:36
professionalDaveAuld3-Feb-10 2:36 
AnswerRe: Can not set the name property of a timer at runtime - VB.NET Pin
dan!sh 3-Feb-10 2:42
professional dan!sh 3-Feb-10 2:42 
AnswerRe: Can not set the name property of a timer at runtime - VB.NET Pin
Wayne Gaylard3-Feb-10 3:03
professionalWayne Gaylard3-Feb-10 3:03 
AnswerRe: Can not set the name property of a timer at runtime - VB.NET Pin
Dave Kreskowiak3-Feb-10 3:29
mveDave Kreskowiak3-Feb-10 3:29 
GeneralRe: Can not set the name property of a timer at runtime - VB.NET Pin
castingflame3-Feb-10 7:01
castingflame3-Feb-10 7:01 
GeneralRe: Can not set the name property of a timer at runtime - VB.NET Pin
Paul Roseby3-Feb-10 10:25
Paul Roseby3-Feb-10 10:25 
GeneralRe: Can not set the name property of a timer at runtime - VB.NET Pin
Paul Roseby3-Feb-10 10:28
Paul Roseby3-Feb-10 10:28 
QuestionListView: How to link columnheader into subitem Pin
jtpaa2-Feb-10 23:44
jtpaa2-Feb-10 23:44 
AnswerRe: ListView: How to link columnheader into subitem Pin
DaveAuld3-Feb-10 0:41
professionalDaveAuld3-Feb-10 0:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.