Link to home
Start Free TrialLog in
Avatar of mattphung
mattphung

asked on

How to display a Processing... message in vb.net using multi-threading

I have a application that takes a long time to process some data so I wanted to display a Processing.... message with animation.

When I display the message before starting the data processing the animation freezes.
How do I display the processing message without freezing the animation? I tried multi-threading but I can't get it to work.
Private MessageThread As System.Threading.Thread
        Public Sub DisplayMessage()
            Dim display As New Processing
            display.MdiParent = mdiMain

            display.Show()

        End Sub

sub CrunchData()

messagethread = new system.threading.thread(address of DisplayMessage)
messagethread.start

''''do data crunching here

''''

messagethread.suspend

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of nepaluz
nepaluz
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Your idea is right, but simply use display.ShowDialog();
Avatar of mattphung
mattphung

ASKER

I ended up using the background worker methods. Thanks
hey guys,

I ran into a problem. After using the background worker method, I thought I tried itkamaraj's suggestion. My problem now is How do I show the results from the worker thread?