Click here to Skip to main content
15,893,486 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: DataGridView populates only first row Pin
Sonhospa29-Dec-13 7:08
Sonhospa29-Dec-13 7:08 
GeneralRe: DataGridView populates only first row Pin
Eddy Vluggen29-Dec-13 17:12
professionalEddy Vluggen29-Dec-13 17:12 
QuestionLINQ Pin
tsunamigang23-Dec-13 18:04
tsunamigang23-Dec-13 18:04 
AnswerRe: LINQ Pin
thatraja23-Dec-13 20:09
professionalthatraja23-Dec-13 20:09 
GeneralRe: LINQ Pin
tsunamigang23-Dec-13 22:08
tsunamigang23-Dec-13 22:08 
QuestionProgressbar value not accurate? Pin
Sonhospa21-Dec-13 0:50
Sonhospa21-Dec-13 0:50 
AnswerRe: Progressbar value not accurate? Pin
Dave Kreskowiak21-Dec-13 4:50
mveDave Kreskowiak21-Dec-13 4:50 
NewsRe: Progressbar value not accurate? Pin
Sonhospa21-Dec-13 9:04
Sonhospa21-Dec-13 9:04 
Hi Dave,

it's basically the code from the Microsoft sample which I had linked to ('Control.Invoke Method'), just with an additional progressbar. But your answer sounds like it's not normal that the control lacks accuracy... The minor changes I made are in the following method:
Public Sub AddListItemMethod()
    Dim myItem As String
    Dim max As Integer = 50
    Dim i As Integer
    Dim percent As Integer

    For i = 1 To max
        myItem = "MyListItem" + i.ToString()
        percent = CInt(i / max * 100)
        ProgressBar1.Value = percent
        StatusStrip1.Refresh()
        myListBox.Items.Add(myItem)
        myListBox.Update()
        myLabel.Text = String.Format("{0} entries ({1}%) added.", CStr(i), percent)
        myLabel.Update()
        Thread.Sleep(30)
    Next i
End Sub
I also reduced the Sleep time of the thread - that's why I asked if 'race conditions' might be involved. It seems as if the delay between label/listbox and progressBar is getting bigger with a lower value for 'Thread.Sleep' - very little delay with 800, much bigger delay with 20 or 30.
GeneralRe: Progressbar value not accurate? Pin
Dave Kreskowiak21-Dec-13 11:34
mveDave Kreskowiak21-Dec-13 11:34 
QuestionVerification Failure (DigitalPersona 4000B) Pin
Member 1048039921-Dec-13 0:35
Member 1048039921-Dec-13 0:35 
AnswerRe: Verification Failure (DigitalPersona 4000B) Pin
Dave Kreskowiak21-Dec-13 4:46
mveDave Kreskowiak21-Dec-13 4:46 
QuestionException Pin
tsunamigang19-Dec-13 20:10
tsunamigang19-Dec-13 20:10 
AnswerRe: Exception Pin
Richard MacCutchan19-Dec-13 21:57
mveRichard MacCutchan19-Dec-13 21:57 
QuestionAnyone else with VB 2010 forms suddenly slow? Pin
BradITM19-Dec-13 11:43
BradITM19-Dec-13 11:43 
AnswerRe: Anyone else with VB 2010 forms suddenly slow? Pin
Dave Kreskowiak19-Dec-13 12:46
mveDave Kreskowiak19-Dec-13 12:46 
AnswerRe: Anyone else with VB 2010 forms suddenly slow? Pin
Simon_Whale20-Dec-13 5:05
Simon_Whale20-Dec-13 5:05 
QuestionDelegate Pin
tsunamigang18-Dec-13 19:35
tsunamigang18-Dec-13 19:35 
AnswerRe: Delegate Pin
Richard MacCutchan18-Dec-13 21:59
mveRichard MacCutchan18-Dec-13 21:59 
QuestionVB Tutorial Pin
tgsb17-Dec-13 19:57
tgsb17-Dec-13 19:57 
AnswerRe: VB Tutorial Pin
Chris Quinn17-Dec-13 21:12
Chris Quinn17-Dec-13 21:12 
AnswerRe: VB Tutorial Pin
Simon_Whale17-Dec-13 22:00
Simon_Whale17-Dec-13 22:00 
AnswerRe: VB Tutorial Pin
thatraja17-Dec-13 23:44
professionalthatraja17-Dec-13 23:44 
Questionbarcode generator Pin
Member 1047210217-Dec-13 3:00
Member 1047210217-Dec-13 3:00 
AnswerRe: barcode generator Pin
David Mujica17-Dec-13 3:34
David Mujica17-Dec-13 3:34 
QuestionBest way to save data in Visual basic Pin
HimanshuSha17-Dec-13 1:45
HimanshuSha17-Dec-13 1:45 

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.