Form Freezing

  • Thread starter Thread starter Norton
  • Start date Start date
N

Norton

I am doing an application which takes a long time to process

I would like to allow user to pause the process and avoid freezing the
screen

what should i do ??
please advise!

Thx in advance!
 
Hi,

Create a thread to do your long process. The thread will work
in the background and not lock the screen. Try running the procedure
outside the thread to see the difference.

Dim mythread As New Threading.Thread(AddressOf LockComputerUp)

mythread.Start()



Private Sub LockComputerUp()

For i As Integer = 1 To 10

'pause 1 second

System.Threading.Thread.Sleep(1000)

Next i

MessageBox.Show("Done")

End Sub


Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top