Threading?
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Hello,
Seems my thread is only run 2x and then stops :(
anyone whats wrong?
'Form load
'Sub Check0
i even changed the sleep to 1000 but didn't do any different
anyone please?
Seems my thread is only run 2x and then stops :(
anyone whats wrong?
'Form load
Code: Select all
NewThread = New Thread(AddressOf Check0)
NewThread.Start()
'Sub Check0
Code: Select all
it must run all the time and not just 2x Me.Invoke(New Action(
Sub()
If status__.Text = 0 Then
GetStats()
Else
GetStats()
End If
End Sub))
Threading.Thread.Sleep(200)
i even changed the sleep to 1000 but didn't do any different
anyone please?
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
You would need to add a loop to keep the thread running.
This can be added in the Check0 sub:
This can be added in the Check0 sub:
Code: Select all
Sub Check0()
While True
Me.Invoke(New Action(
Sub()
If status__.Text = 0 Then
GetStats()
Else
GetStats()
End If
End Sub))
Threading.Thread.Sleep(200)
End While
End Sub
hello #mandai
thanks for reply me.
but seems now with the piece while true
my form keeps turning on and off :(
now i can't do anything because its go crazy
any idea?
thanks
thanks for reply me.
but seems now with the piece while true
my form keeps turning on and off :(
now i can't do anything because its go crazy
any idea?
thanks
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
Watch this http://www.youtube.com/watch?feature=pl ... K5D4Y2fnl4
This should explain and help you with threading =D
This should explain and help you with threading =D
yea thanks #benji_19994
everything they said i have showed here already :p
so this don't helped me much
thanks anyway ;)
everything they said i have showed here already :p
so this don't helped me much

thanks anyway ;)
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
hello,
seems i got it working but how to fix it when you scroll up or down in a panel
i even set the thread to 1000
it freeze a sec :(
any idea how to make go smooth?
thanks
seems i got it working but how to fix it when you scroll up or down in a panel
i even set the thread to 1000
it freeze a sec :(
any idea how to make go smooth?
thanks
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
its very well explained here.. this Link could be a help to you..
http://www.vbforums.com/showthread.php? ... -in-VB.Net
http://www.vbforums.com/showthread.php? ... -in-VB.Net
hello #noypikami,
thanks
but i solved the thread like i said earlier
but still got a problem with scrolling
any idea?
thanks

but i solved the thread like i said earlier

but still got a problem with scrolling

any idea?
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
grrrrrrrr
drives me nuts
now the thread runs but if you wait a while before adding a new message
the thread has stops!!!!
how is this even possible when you use a while me.visible?????
seems we got this error in the thread ?
any ideas?
drives me nuts
now the thread runs but if you wait a while before adding a new message
the thread has stops!!!!
how is this even possible when you use a while me.visible?????
seems we got this error in the thread ?

any ideas?
Last edited by Dummy1912 on Tue Mar 12, 2013 10:17 am, edited 1 time in total.
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
may be the problem is with the (while) or loop, coz the app cannot process
the thread when its still busy or in use.
try something like this............
Private Sub check0 (ByVal x As Boolean)
If x=true Then
' do something here
Else
'... do something here
End If
End Sub
the thread when its still busy or in use.
try something like this............
Private Sub check0 (ByVal x As Boolean)
If x=true Then
' do something here
Else
'... do something here
End If
End Sub
Copyright Information
Copyright © Codenstuff.com 2020 - 2023