Vb.NET (Visual Basic 2008/2010) : How to use a BackgroundWorker

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ม.ค. 2025

ความคิดเห็น • 71

  • @GabrielM01
    @GabrielM01 4 ปีที่แล้ว

    Do you have a tutorial for the delegates? I can work for this for now with my applications, but i know crossthreading is dangerous, i would like to learn delegates aswell

  • @leocfox
    @leocfox 12 ปีที่แล้ว

    i want to show a picture of a loading.gif with the background worker. rather than a progress bar.. can you help me with this please?

  • @Tonio2110
    @Tonio2110 12 ปีที่แล้ว

    It seems that loops run annoyingly slower in the BackgroundWorker than in the default Thread. Is there a solution or alternative to that?

  • @gtag174
    @gtag174 10 ปีที่แล้ว

    how do i do this if i need get the progress bar working with a data grid

  • @SiebeBosch
    @SiebeBosch 10 ปีที่แล้ว

    I've got a few hundreds of tasks to run, of which I'd like 4 to run parallel each time. Any thoughts on how to do that? I guess 4 background workers should do the trick, but then again: how do I keep track of which worker has finished and can start a new task? Or would a PoolThread be a better option here?

  • @chriscowman
    @chriscowman 12 ปีที่แล้ว

    Thanks a lot. I've been looking for a good tutorial to show me this. I needed to monitor the clock speed of my cpu but my GUI was going all non-responsive. This is exactly what I needed :)

  • @skateboarderboy1
    @skateboarderboy1 10 ปีที่แล้ว +1

    Question, I have implemented a background worker and works great.
    The project I am working on basically copies a the entirety of one directory to another. If a file fails to copy(ie. it is to long for the destination path) then it catches the file as an exception and write the file name and path a a text file entitled 'error log'. The background worker works in when the are no exception files caught, but if an exception is caught, the report progress of the background workers is failing to continue adding a file counter to the total progress even though I have a variable dedicated to counting the files even this cases and reported this number to the report Progress method. The background worker end prematurely in the later case, even though there is still plenty of "work" to be done.
    Any ideas?

  • @enzanblazer
    @enzanblazer 11 ปีที่แล้ว

    Do you have a video where you explain the delegates part?

  • @JonahLiu
    @JonahLiu 11 ปีที่แล้ว

    Awesome. Best tutorial I've seen about coding, and I've seen a lot.

  • @buddyroach
    @buddyroach 8 ปีที่แล้ว

    can i use a background worker to run a timer? cuz i tried and its not working.

  • @VidGaming
    @VidGaming 8 ปีที่แล้ว

    Is the count milliseconds?

  • @polasanderson6353
    @polasanderson6353 11 ปีที่แล้ว +1

    the code is good but if you use it for scraper to scrape links so it starts freezing a a little bit.
    Now i need to know how to stop the backgroundworker
    cuz the cancelasyn() is not working at all
    Thank you.

  • @DoubleDYouTube
    @DoubleDYouTube 13 ปีที่แล้ว

    I tried to make a file copier or a downloader and progressbar doesn't work! Why?

    • @DoubleDYouTube
      @DoubleDYouTube 3 ปีที่แล้ว

      @@Personal-rc7cy Uh... Sure... Let me just dig up my 9 year old Visual Basic projects...

  • @LiableOne5
    @LiableOne5 10 ปีที่แล้ว

    How do you cancel / stop the background worker

  • @lightningz1712
    @lightningz1712 6 ปีที่แล้ว

    Does backgroundworker continue to run if the form is closed?

  • @rogerbreton6412
    @rogerbreton6412 5 ปีที่แล้ว

    Does not work in my application :(

  • @Atri48
    @Atri48 12 ปีที่แล้ว

    How did you got that title sequence?

  • @RandomGermanBrit
    @RandomGermanBrit 12 ปีที่แล้ว

    Thanks a ton! Now I actually know how I can make my program download stuff!
    Could you also make a tutorial with the same kind of topic, just one where the backgroundworker saves the file/s to a specific location? If yes, then that would be awesome!

  • @romzcodie2337
    @romzcodie2337 3 ปีที่แล้ว

    Hi sir, thank you for this wonderful tutorial, it really helps me a lot, but if you don't mind, may I ask a favor on how to apply this progressbar and backgroundworker in saving data from datagridview to ms access database. Thank you so much for any help sir. God Bless!

  • @firasdaw6745
    @firasdaw6745 4 ปีที่แล้ว

    spontaneous and straight to the point .. thank you

  • @babzo1
    @babzo1 11 ปีที่แล้ว

    Another well explained tutorial .Thanks Brandon.U got d skill....

  • @darrenlogan6438
    @darrenlogan6438 8 ปีที่แล้ว +9

    Hi,
    Forcing "Ignore cross-thread errors" is not recommended. You should update all ui controls in the report_progress event, just like you did for the progress bar.
    Not the best advice from a tutorial!

    • @dravenadonis8952
      @dravenadonis8952 3 ปีที่แล้ว

      Pro tip: watch series on Flixzone. Me and my gf have been using it for watching all kinds of movies these days.

    • @christianotto3910
      @christianotto3910 3 ปีที่แล้ว

      @Draven Adonis Yup, I have been using Flixzone for years myself =)

  • @Doowi92
    @Doowi92 5 ปีที่แล้ว +2

    to fix it its simple just modify your label1 text like this
    Me.Invoke(Sub() Label1.Text = i) like this no need to add checkforillegal...

  • @empemitheos
    @empemitheos 12 ปีที่แล้ว

    great video, so much clearer than the msdn docs

  • @henriklauridsen9686
    @henriklauridsen9686 11 ปีที่แล้ว

    Thank you. I enjoy they way you show how to. Hope you do many more.

  • @enzanblazer
    @enzanblazer 11 ปีที่แล้ว

    Amazing tutorial man, very clear and easy to follow.

  • @Atri48
    @Atri48 12 ปีที่แล้ว

    Do you have windows 8??

  • @bobbriggs4287
    @bobbriggs4287 4 ปีที่แล้ว

    Thanx for showing me how to perform a wait using thread sleep.

  • @TonyAwad88
    @TonyAwad88 13 ปีที่แล้ว

    Good job on this. Clean and straight forward. Cheers

  • @GameWithBrony
    @GameWithBrony 11 ปีที่แล้ว

    Thank you very much! You helped me with making a program simillar to Tapatalk

  • @polasanderson6353
    @polasanderson6353 11 ปีที่แล้ว

    Still freezing and even does not stop

  • @herrjonna2007
    @herrjonna2007 6 ปีที่แล้ว

    Amazing tutorial! These are rear, keep up the good work!

  • @xxblinddxx
    @xxblinddxx 13 ปีที่แล้ว

    Thanks.. just what i was looking for!

  • @Camixcs13
    @Camixcs13 12 ปีที่แล้ว

    Thanks Great Tutorial :D
    It helped me with my "Email Sender" Application :)

  • @ashraf.mohamed
    @ashraf.mohamed 10 ปีที่แล้ว +1

    You are a genius. thank you very much :)

  • @dragoonadept
    @dragoonadept 13 ปีที่แล้ว

    Internet heroes, the lot of you brave, brave souls.

  • @LedinukasTV
    @LedinukasTV 13 ปีที่แล้ว

    Very nice theme. Can you send me link of your theme? (buttons, progressbars) Please. ;P I subed.

  • @punksnotdead4766
    @punksnotdead4766 2 ปีที่แล้ว

    Good tutorial

  • @femtozz
    @femtozz 12 ปีที่แล้ว

    very very useful ... thank you

  • @eduardocatoc8505
    @eduardocatoc8505 7 ปีที่แล้ว

    thank you so much, sir!

  • @peterschiller2451
    @peterschiller2451 8 ปีที่แล้ว

    Instead using backgroundworker, you could use the Async method.
    Private Async Sub Button.clicked bla bla
    your code
    await task.delay(200)
    end sub

  • @mattkingz
    @mattkingz 11 ปีที่แล้ว

    Thank you for the tutorial! c:

  • @Hackerzpwned
    @Hackerzpwned 12 ปีที่แล้ว

    Nice tut :)

  • @raygun2092
    @raygun2092 4 ปีที่แล้ว

    god bless you speak english and no wierdo indian accent :D

  • @emann123456
    @emann123456 13 ปีที่แล้ว

    ok

  • @ThomasOrlita
    @ThomasOrlita 9 ปีที่แล้ว

    Thanks :)

  • @drsybousse2658
    @drsybousse2658 9 ปีที่แล้ว

    thnx

  • @Irishsam
    @Irishsam 11 ปีที่แล้ว

    remove the spaces

  • @kamilblaszczyk6631
    @kamilblaszczyk6631 9 ปีที่แล้ว

    THX

  • @fzotya22
    @fzotya22 13 ปีที่แล้ว

    nice vid, +1 subsriber

  • @Irishsam
    @Irishsam 11 ปีที่แล้ว

    this is pathetic, urgh me.invoke(sub() me.label.text = "fucking few words to do this") delegating is hardly fucking hard is it?

  • @ashraf.mohamed
    @ashraf.mohamed 10 ปีที่แล้ว

    +1 :)

  • @subs2meplease
    @subs2meplease 13 ปีที่แล้ว

    6th!!!

  • @qwaxer
    @qwaxer 13 ปีที่แล้ว

    3rd!!

  • @ganzstar98
    @ganzstar98 13 ปีที่แล้ว

    4rd!!!

  • @micahlawton
    @micahlawton 10 ปีที่แล้ว

    sub

  • @umaidkhakwani
    @umaidkhakwani 13 ปีที่แล้ว

    2nd!

  • @MrVBMagic
    @MrVBMagic 13 ปีที่แล้ว

    0th!!!

  • @Evanhorsley-brickman619
    @Evanhorsley-brickman619 13 ปีที่แล้ว

    1st!!!

  • @emann123456
    @emann123456 13 ปีที่แล้ว

    not an expert!!!!

  • @ryanthomas1902
    @ryanthomas1902 9 ปีที่แล้ว

    I have done the check for illegal cross thread calls but am still getting the error... any ideas?