Program "Not responding"

  • Thread starter Thread starter Botak
  • Start date Start date
B

Botak

Hi, I wrote an app under vb.net to calculate huge data from MS Sql server.
Whenever this app is running, I could not do other work. Or else, the app
will become "not responding" but actually it is still running and
processing. Also, the progressbar will no longer active.

How should I overcome this?

TIA
 
just run it as a thread or asynch call..

a quick fix to the issue...call it on a separae thread like the following..
just note that doing it this way when u call LongCalc u cant include
parameters..
if u need to send some over u can put longCalc in a class and set some
properties or variables for it to read from.


Private Button1_Click( .....)
dim th as New System.Threading.Thread(LongCalc)
th.Start
End Sub

sub LongCalc()
'code here ...
End sub


Botak said:
Hi, I wrote an app under vb.net to calculate huge data from MS Sql server.
Whenever this app is running, I could not do other work. Or else, the app
will become "not responding" but actually it is still running and
processing. Also, the progressbar will no longer active.

How should I overcome this?

TIA
just run it as a thread or asynch call..

a quick fix to the issue...call it on a separae thread like the following..
just note that doing it this way when u call LongCalc u cant include
parameters..
if u need to send some over u can put longCalc in a class and set some
properties or variables for it to read from.


Private Button1_Click( .....)
dim th as New System.Threading.Thread(LongCalc)
th.Start
End Sub

sub LongCalc()
'code here ...
End sub
 
Actually

dim th as New System.Threading.Thread(AddressOf LongCalc)


--

OHM ( Terry Burns )
. . . One-Handed-Man . . .

Time flies when you don't know what you're doing
 
* "Botak said:
Hi, I wrote an app under vb.net to calculate huge data from MS Sql server.
Whenever this app is running, I could not do other work. Or else, the app
will become "not responding" but actually it is still running and
processing. Also, the progressbar will no longer active.

Multithreading:

<URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms06112002.asp>
<URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms08162002.asp>
<URL:http://msdn.microsoft.com/library/en-us/dnforms/html/winforms01232003.asp>

<URL:http://www.devx.com/dotnet/Article/11358/>

<URL:http://msdn.microsoft.com/library/e...SystemWindowsFormsControlClassInvokeTopic.asp>

Multithreading in Visual Basic .NET (Visual Basic Language Concepts)
<URL:http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconthreadinginvisualbasic.asp>
 
Back
Top