| Welcome to USLS Computer Science Boards. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Threading Topics; Coding for Threading here | |
|---|---|
| Tweet Topic Started: Sep 7 2006, 02:45 AM (317 Views) | |
| vincentg | Sep 7 2006, 02:45 AM Post #1 |
![]()
|
Threading is a technique in which you want to execute a process and do another thing on the same time. For those who are familiar of Visual Basic Windows Application. 1. A good example of it is the Timer Object (lets name the object as tmrClock)in w/c if you try to code in the Tick Event. Like this Private Sub tmrClock_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrClock.Tick Me.Text = Now End Sub when you run your app, it will show you the date & time on the Form Caption or Text. It means to say, as your Form is running and Timer Event runs too. Be sure to set the Timer.Interval = more than 0 w/c means it will runs on the Nth Millisecond. Just dont get confuse. Butange lng 100. ayos na ina.2. The flexibility of the .Net does end on Timer Object only for Multi Threading. You can create you own. Lets say, you have a Form and a Button and a Procedure. Lets say if you click the Button it calls your procedure. Lets assume your procedure runs a little bit longer which the result is, it freezes your entire Form. If you force to click the Form, possible it will give you "Not responding". In that case you need to create a Threading. Ex. you have a procedure Sub LongToProcessFreezesTheForm <blah> <blah> <blah> <blah> End Sub In the Click Event of the Button Private Sub btnMyButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRefresh.Click Dim MyThread As System.Threading.Thread MyThread=New System.Threading.Thread(AddressOf LongToProcessFreezesTheForm) MyThread.Name = "Name of Your Thread" MyThread.Start() End Sub Test it. This is VB.Net 2003 Coding. Best if u test it under 2003. I think this should work on 2005. By using this code, you can freely click the form again. Just be careful dont click again the button. It tries to eliminate the Form Freeze. Sorry for my english. If my wrong spelling, correction-ne nyo lng ako. ehehehe.. Enjoy. |
![]() |
|
| batousai | Sep 13 2006, 05:40 PM Post #2 |
![]()
Pointer
|
Mr. VincentG...ano ka nga batch nag graduate? ngaa kabalo ka na ya haw? wla mana gna tudlo sa amon....Are you one of the top programmers in you batch? if so how can i contact you for tutorial... |
![]() |
|
| vincentg | Sep 13 2006, 07:41 PM Post #3 |
![]()
|
nevermind |
![]() |
|
| batousai | Sep 14 2006, 06:14 PM Post #4 |
![]()
Pointer
|
Mr Vincent G., Batch 98 ka gle....kabalo nako gle sang gn sulat ni ROBIN!!!! Bayi da sya...waiter man lang gd na sya tuod guro sa raffy's....unlike you..earning dollars gle ha...Ikaw guro pinaka mayu sa batch mo ay...bati ko pa gd ikaw kno gapang hack sang una, ikaw ga pang panas mga files sang students kag teachers...grabe ka na gd ya...you are hardcore one dude.. Back to topic...How efficient is threading? wla na problema sa hang? how do you determine the priority of the thread? how do you protect your other process kng mag hang ang isa? is it possible to utilize HT Technology of Intel? |
![]() |
|
| vincentg | Sep 14 2006, 10:35 PM Post #5 |
![]()
|
do u need to post all those stuff? ma lay low ko anay, cant get the reason why may discrimation d. ga try man lng ta gani bulig sa mga student..... i am even the one who convince the ff to join this forum Eric M Chris Ongsungco Mike Castillo iban pa gid...like Intel R&D ppl galing daw budlay gid.... See yah soon na lng... |
![]() |
|
| Shiegz | Sep 14 2006, 11:00 PM Post #6 |
![]()
"Teh" Sir Tan
![]()
|
closing topic as requested by thread starter. |
![]() |
|
| « Previous Topic · Microsoft Visual Studio · Next Topic » |



ayos na ina.





12:36 AM Jul 14