程序执行中,程序的画面被锁定了,如何解决

程序执行中,程序的画面被锁定了,怎么解决?
我有一段程序。循环处理的,其中要thread.sleep一段时间。
可能执行1分钟。 可是执行的过程中,程序就像死了是的。 都不敢点。 


怎么解决啊???

郁闷~!~!

------解决方案--------------------
另外,少年……线程 != 异步
------解决方案--------------------
一个异步回调例子

VB.NET code

    Private Function do_it() As String
        Return "OK"
    End Function

    Private Function do_it_Message(ByVal ar As IAsyncResult) As String
        Dim msg As handDoitHelper = CType(ar.AsyncState, handDoitHelper)
        Dim strMessage As String = msg.EndInvoke(ar)

        MsgBox(strMessage)
    End Function

    Private Delegate Function handDoitHelper() As String

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim dg As New handDoitHelper(AddressOf do_it)
        Dim InvokeObject As IAsyncResult
        InvokeObject = dg.BeginInvoke(AddressOf do_it_Message, dg)
    End Sub