VB.NET Tutorial 53 - MultiThreading (Visual Basic 2008/2010)

  Рет қаралды 112,940

TeachMeComputer

TeachMeComputer

Күн бұрын

Пікірлер: 102
@rogerbreton6412
@rogerbreton6412 4 жыл бұрын
Thank you so much for your patience and generosity in explaing the basic idea behind multithreading. This provides a simple solution to the issue I ran into, trying to start a Timer on a given WinForm at the press of a button. The problem is that the Timer_tick never excecutes.
@philm5380
@philm5380 9 жыл бұрын
Thank you for simplifying this concept! My UIs are always frozen and my progress bars are always ghetto (i += 1 and refresh, etc.) Now I'm gonna learn about delegates and get professional up in here... Um, where's the next tutorial with the delegates? ... TeachMeComputer! My career is in your hands! What are delegates and how do I use them?! :(
@hdqxgxa
@hdqxgxa 13 жыл бұрын
Excellent tutorial. We appreciate the time that you take in developing and recording the tutorials. I also like the way you provide a quick explanation when you take "shortcuts" like the crossthreading check....for those critics out there....this is for Instructional Purposes Only due to time constraints..... Thanks again!
@AbishaiSingh
@AbishaiSingh 3 жыл бұрын
Thanks for explaining the concept in a very simplified manner..
@stansarproductionz
@stansarproductionz 11 жыл бұрын
this scouser is great, explains complicated concepts with ease. keep it up!!!
@taarchi
@taarchi 11 жыл бұрын
我非常喜欢你的教程关于线程,你的解释很清除! Thank you very mucch for your explanation, very clears, now I undestand crossthreading
@NathanaelCrapo
@NathanaelCrapo 12 жыл бұрын
I like this tutorial upto the part where you used the cross threading. i found a way around that without doing the delegate thing and it was simple enough for me to learn all on my own.
@Sc00rpY
@Sc00rpY 13 жыл бұрын
Just change quality to 720p and you will see the code on fullscreen :) Thanks for this tutorial, i looked for a way to pass that error on compiling
@TheColonel_
@TheColonel_ 10 жыл бұрын
Very nice, when googling this I just end up with something that has 29347692837492837492834 lines of code just to show one small example -.- This was very nice and simple, thanks.
@kevins1738
@kevins1738 7 жыл бұрын
Very good example! very usable for high frequency transactions, reports, etc
@TeamOrtus
@TeamOrtus 12 жыл бұрын
Did you ever post the next tutorial explaining the use of delegates? If so any chance you can post where it's located as I can't seem to find it. Great tutorials... please keep adding more as they've helped me out alot. Many thanks :-)
@peekay69
@peekay69 12 жыл бұрын
Thanks a lot for your tutorial! Where is the delagate tutorial you promised?
@gybersantos
@gybersantos 13 жыл бұрын
@TheCowWhoClutchd Timer executes the code inside it repeatedly with the delay of what the value of its Interval property. The thread executes the code parallel with the main thread. When we say parallel, it is executed at the same time...
@LosTecH88
@LosTecH88 14 жыл бұрын
thanks man... nice tutorial again...cant wait for the next tutorial...
@ramasamyramasamy
@ramasamyramasamy 12 жыл бұрын
Thank you for video tutorial. After starting the thread you haven't mentioned anything about the thread abort or closing of thread. Hope it's necessary to abort the thread while closing the form. But Great work dude! Well done !
@lycosa2000
@lycosa2000 12 жыл бұрын
Thanks a lot for this.. I've been looking for a solution for VB's clunky timer control that opened, read, and then closed a serial port and my program froze each time the timer fired and it was really annoying me. This helped a ton!
@rogerbreton6412
@rogerbreton6412 4 жыл бұрын
I'm in the same boat! I need to show time elapsed in my Form for the user to know what's going on, because the time to send a command and receive a response from the RS-232 port can go from a few seconds to 10 minutes!
@ThePassingVoid
@ThePassingVoid 9 жыл бұрын
You can also use "i += 1" to increment i by 1in the loop.
@ryasmi
@ryasmi 14 жыл бұрын
nice video, very descriptive and clear.
@hectormzt1
@hectormzt1 4 жыл бұрын
Thanks dude! i was looking for this
@emann123456
@emann123456 13 жыл бұрын
thank you for making the tutorial even if 3-4AM
@henryjpr4756
@henryjpr4756 11 жыл бұрын
Thanks MUCH! It's a shame you didn't do the "Threading Using Delegate" tutorial. There are other tutorials on the subject, but I'm having trouble when a thread, from a module, attempts to update a control on a form in the UI Thread. I see nothing on that.
@owlglazing
@owlglazing 10 жыл бұрын
Where is the Delegate post? My app is really big and multithreading doesn't work.
@NathanaelCrapo
@NathanaelCrapo 12 жыл бұрын
or use an Enum as a status keeper and use a timer specific to managing those other threads from the main thread which want to access controls on the main thread.
@ncc1853
@ncc1853 12 жыл бұрын
I love the simplicity of the tutorial. Do you post your somewhere?
@MouraoRenato
@MouraoRenato 12 жыл бұрын
Excellent video. It`ll help me a lot in a project I`m developing. Thank you very much for the video.
@victornogueira8317
@victornogueira8317 3 жыл бұрын
good video!!!! From GnSistemas!
@klynh13
@klynh13 14 жыл бұрын
thx big time. right now the only way i knew how to multithread was though a background worker but this is ay better
@Machiavelli_0000
@Machiavelli_0000 12 жыл бұрын
I appreciate your videos. Thanks for your work.
@wgh999
@wgh999 13 жыл бұрын
Thanks for making it so basic!
@GhostMajoRX
@GhostMajoRX 9 жыл бұрын
Tnx bro now im fixed my chat application auto refreshing... thank you a lot ;)
@50Hz
@50Hz 10 жыл бұрын
That was very good..
@tilankak
@tilankak 14 жыл бұрын
Thanks. Very helpfull
@oakbank1953
@oakbank1953 6 жыл бұрын
Nice and simple; just what the doctor ordered...:)
@misaik
@misaik 12 жыл бұрын
u can use delegate too for mor security
@untitledname5183
@untitledname5183 10 жыл бұрын
Great way to explain, thx
@hwatcha24
@hwatcha24 12 жыл бұрын
great tutorial !
@Many_Mirrors
@Many_Mirrors 14 жыл бұрын
Like you!
@denisikac
@denisikac 3 жыл бұрын
Thank you
@danedavis5098
@danedavis5098 10 жыл бұрын
great video, thanks!
@Bulfoz
@Bulfoz 13 жыл бұрын
Well done. thank you.
@matrixitalia7575
@matrixitalia7575 14 жыл бұрын
what the program 4 recording from desktop? :) thks nice video!
@peterschiller2451
@peterschiller2451 8 жыл бұрын
Since VStudio 2012 it is possible to use Async with Await task.delay(xxx). It's much more easy to use. You can run as much threads as you want. Async Sub xxx() do until i >1000 I +=1 label1.text=i await task.delay(100) loop
@iRepTiLeZHD
@iRepTiLeZHD 11 жыл бұрын
make a separate thread for each sub and try to break everything into subs so every action can have its space. for example : private sub compress1 choose file - end subprivate sub compress2 read file end sub - private sub compress3 write to file end sub - private sub compress4 compress end sub ___ then make a thread for each sub
@Vortex93
@Vortex93 13 жыл бұрын
Can you make a tutorial on how to make Server with ports and run on ip etc.. ??
@hscsoft_tutorials
@hscsoft_tutorials 9 жыл бұрын
Masssive thank u for crosscheck solution.
@stonkwell
@stonkwell 13 жыл бұрын
yoink! cheers mate
@soulreaver4962
@soulreaver4962 13 жыл бұрын
@5hunt3r it's just checkforillegalcrossthreadcalls = false
@eduardositedotcom
@eduardositedotcom 12 жыл бұрын
thanks thanks thanks thanks. you are my new.cool.idol(Byval thebest)
@jeffb1122
@jeffb1122 Жыл бұрын
is that will work on datagridview?
@carstorm85
@carstorm85 13 жыл бұрын
So doing this I can make a game right? Because right now My game is laggy-like because only one thing moves at a time.
@fede142857
@fede142857 12 жыл бұрын
Now, how do I run several pieces of the same code in different threads? I don't really know how to say it, so here is an example of what I want: Pretend I'm making a file compressor, but when I test it I find that it works too slowly (i.e. takes 2 minutes to compress a single 4MB file) and want to speed it up, say, at least 4 times as fast. How should I do that? Someone please reply.
@pivitman101
@pivitman101 14 жыл бұрын
thanks man this help me .
@iRepTiLeZHD
@iRepTiLeZHD 11 жыл бұрын
actually, setting 'CheckForIllegalCrossThreadCalls' to false is important if your using multi-threading for security-purposes
@odonnaghan
@odonnaghan 13 жыл бұрын
Thank you!
@HemmingEducation
@HemmingEducation 13 жыл бұрын
great
@TheMadHeadSeries
@TheMadHeadSeries 12 жыл бұрын
How come a open file dialog is blank when run on a separate thread is it a bug?
@PaulNathan82
@PaulNathan82 12 жыл бұрын
Nice tutorial, thanks :-))
@flyrose9685
@flyrose9685 8 жыл бұрын
thank's men for this tutorial
@25DMTutorial
@25DMTutorial 11 жыл бұрын
I have just add an updater in my application with the help of your Video: VB.NET Tutorial 40; and so When I checked for update and then when I click anywhere on the form then the Form does not respond. (My internet connection is too slow, so that I causes the Problem While Checking for update too...) So please Help me
@roydolfje
@roydolfje 13 жыл бұрын
is there an way to make the countup faster
@njthemonsterIII
@njthemonsterIII 14 жыл бұрын
quick explanation: Me.ChekForIllegalCallSigns = False ; He got this error because both threads were using a shared variable or component (in this case Me.Refresh), this error is to prevent multiple threads from modifying a common variable and thereby screwing eachother over. Me.refresh wont cause anything bad to happen if they cross. But beware, never use a common variable with Me.CheckForIllegalCallsSigns =False :D I shall make a video to explain this fully.
@엠에스티시스템
@엠에스티시스템 9 жыл бұрын
Thanks.
@TMakawa265
@TMakawa265 11 жыл бұрын
PlayThroughForYou why shouldnt we use that checkforillegalcrossthreadcalls = false...what could end up happening?
@Thapains
@Thapains 14 жыл бұрын
@TheEpicNewb Do you have .net framework 4?
@leriosindane720
@leriosindane720 3 жыл бұрын
Still Dop in 2021
@SlavaVB
@SlavaVB 3 жыл бұрын
How come it counts up so slow washout a delay?
@geilereliasradillosarmient4936
@geilereliasradillosarmient4936 10 жыл бұрын
and if to run two forms at once as I could do this using threads
@megascan
@megascan 6 жыл бұрын
Thx man
@ncc1853
@ncc1853 12 жыл бұрын
your code somewhere?
@DJDexeee
@DJDexeee 13 жыл бұрын
Guys Its not Me.CheckForIllegalCrossThreadCalls = False Its Control.CheckForIllegalCrossThreadCalls = False
@alfredcancio982
@alfredcancio982 7 жыл бұрын
i just wanted to know if is it possible that an array of multithreading?
@Mahekaru
@Mahekaru 6 жыл бұрын
I wouldn't use an array try using a list try dim lstThreads = new list(of threads) then do lstthreads.add(). Keep in mind you'll need a loop like a for each loop to go through each thread and start them all. something like for each i in lstthreads i.start loop.
@sarthaksharma9746
@sarthaksharma9746 10 жыл бұрын
Can I use Multi Threading to DDoS Websites also?
@BitSec
@BitSec 10 жыл бұрын
agcourse u can
@5hunt3r
@5hunt3r 13 жыл бұрын
little question ... tryed to add "Me.CheckForIllegalCrossThreadCalls = False" but VB2010 wont accept this .... anyone knows why ?
@stefanorevic5116
@stefanorevic5116 7 жыл бұрын
If i run multiple threads, how do i stop all of them in single button click?
@Mahekaru
@Mahekaru 6 жыл бұрын
it's like if thread.isbusy then thread.stop or suspend something like that.
@destroyer7712
@destroyer7712 9 жыл бұрын
thx
@alialali3a
@alialali3a 13 жыл бұрын
Thankssssssssssssssssssss
@sputtnikk11
@sputtnikk11 12 жыл бұрын
How do i pass parentheses? It wont let me :/
@IMSSEvolution
@IMSSEvolution 11 жыл бұрын
Add to form load Control.CheckForIllegalCrossThreadCalls = False THEN YOU WONT NEED Delgats
@pranays94
@pranays94 10 жыл бұрын
You are from Liverpool,arent you? :P
@rogerbreton6412
@rogerbreton6412 4 жыл бұрын
Is that where his accent comes from? I thought, naively, "Scotland". But I'm French :-)
@Razorrule
@Razorrule 10 жыл бұрын
best way are Delegates instead of AllowCrossThreadCalls. (just want to say)
@Blubbz0rZ
@Blubbz0rZ 14 жыл бұрын
@swehunter2000 You can actually do that, leave me a pm with the exact error and I'll tell you a fix.
@MadMatty72
@MadMatty72 6 жыл бұрын
'DoEvents' statement inside loop would have allowed either button to work. Both loops would be running on same thread however. Explanation good except for allowing cross threading - very bad.
@rayags
@rayags 11 жыл бұрын
some tutorial where delegates use????? help me XD
@Blubbz0rZ
@Blubbz0rZ 14 жыл бұрын
@swehunter2000 Form.Show / Form.ShowDialog Put control.checkforillegalcrossthreadcalls = False on startup
@silentcod3r
@silentcod3r 12 жыл бұрын
Agreed. Using this approach seems bad practice and it's a lazy programmers approach.
@MadMatty72
@MadMatty72 6 жыл бұрын
DoEvents
@gamenew09
@gamenew09 13 жыл бұрын
@rich2600rich2600 Check if you muted on your computer and the KZbin player.
@Irishsam
@Irishsam 12 жыл бұрын
Teaching yours to use check for illegal cross threads is just unforgivable. As your project grows and becomes more complex tracking down bugs may become harder. You can leave your self with race conditions or deadlocks. You should never be setting CheckForIllegalCrossThreadCalls to False. Whenever you have a need to access a control from a thread other than the UI thread, you should use a delegate to invoke a method.
@PlayThroughForYou
@PlayThroughForYou 11 жыл бұрын
It would send many errors later on, all its doing is saying even if the application finds an error it would keep going, this is a bad thing. you want to invoke your threads rather than not checking for errors. look up invoking tutorials for real multi-threading. This is just the slum way of doing things and is really bad.
@toneation
@toneation 13 жыл бұрын
Thanks,please zoom ; )
@bubba6647
@bubba6647 2 жыл бұрын
Doing two bad functions at the same damn time.....
@nemanja747
@nemanja747 11 жыл бұрын
I CANT SEE SHIT!!!
@PlayThroughForYou
@PlayThroughForYou 11 жыл бұрын
NO NO NO NO NO, Me.CheckforIllegalCrossThreadCalls = false IS A BAD HABBIT, do not watch this! Can cause many issues later on. I love your tutorials but do not listen to this one!
@nenenartey4266
@nenenartey4266 10 жыл бұрын
Thanks. very helpful
VB.NET Tutorial 54 - Regex (Part 1) (Visual Basic 2008/2010)
12:38
TeachMeComputer
Рет қаралды 59 М.
Advanced VB.NET Programming - Delegates
18:59
Computer Science Lessons
Рет қаралды 8 М.
Wait… Maxim, did you just eat 8 BURGERS?!🍔😳| Free Fire Official
00:13
Garena Free Fire Global
Рет қаралды 9 МЛН
Elza love to eat chiken🍗⚡ #dog #pets
00:17
ElzaDog
Рет қаралды 24 МЛН
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 118 МЛН
8 await async mistakes that you SHOULD avoid in .NET
21:13
Nick Chapsas
Рет қаралды 315 М.
Advanced VB.NET Programming - Threads, Events and Delegates (Part 1)
16:06
Computer Science Lessons
Рет қаралды 7 М.
MULTITHREADING IN VB.NET FOR BEGINNERS FAST AND EASY
11:28
How To
Рет қаралды 3,4 М.
Advanced VB.NET Programming - Threads, Events and Delegates (Part 2)
24:04
Computer Science Lessons
Рет қаралды 4,3 М.
When do you use threads?
29:36
Hussein Nasser
Рет қаралды 16 М.
An Illustrated Guide to OAuth and OpenID Connect
16:36
OktaDev
Рет қаралды 608 М.
Visual Basic Tutorial - 144 - Threading
6:07
thenewboston
Рет қаралды 21 М.
How To Use Multi Thread IN VB.NET
3:42
VB.NET
Рет қаралды 1,7 М.
Wait… Maxim, did you just eat 8 BURGERS?!🍔😳| Free Fire Official
00:13
Garena Free Fire Global
Рет қаралды 9 МЛН