Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8456591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:34:59+00:00 2026-06-10T12:34:59+00:00

I used to use MsgWaitForMultipleObjects with success to wait on the event’s handle and

  • 0

I used to use MsgWaitForMultipleObjects with success to wait on the event’s handle and pump messages at the same time.

However I don’t have that procedure on Windows Mobile.

The situation is as follows:

  • I open form which displays some animation
  • Run thread
  • Wait until thread finishes (when it sets event to Set())

Without pumping messages I will not see the animation on the form as waiting for the thread using WaitOne for instance, is blocking everything …

How can I achieve the same functionality on Windows Mobile?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T12:35:01+00:00Added an answer on June 10, 2026 at 12:35 pm

    A simple way to achieve what you’re looking for is to use the BackgroundWorker class that’s part of the OpenNETCF framework

    It’s essentially a functional copy of the System.ComponentModel.BackgroundWorker class from the full .NET framework.

    Execute as follows:

    1. start animation on form load event
    2. start backgroundworker
    3. wait for backgroundworker to fire completion event.

    Below is an example adapted from the MSDN backgroundworker class documentation that may point you in the right direction.

        public Form1()
        {
            InitializeComponent();
            InitializeBackgroundWorker();
    
        }
    
        // Set up the BackgroundWorker object by  
        // attaching event handlers.  
        private void InitializeBackgroundWorker()
        {
            backgroundWorker1.DoWork += 
                new DoWorkEventHandler(backgroundWorker1_DoWork);
            backgroundWorker1.RunWorkerCompleted += 
                new RunWorkerCompletedEventHandler(
            backgroundWorker1_RunWorkerCompleted);
            backgroundWorker1.ProgressChanged += 
                new ProgressChangedEventHandler(
            backgroundWorker1_ProgressChanged);
        }
    
        protected override void OnLoad(EventArgs e)
        {
    
            if (backgroundWorker1.IsBusy != true)
            {
                // Start the asynchronous operation.
                // start your animation here!
    
    
                backgroundWorker1.RunWorkerAsync();
            }
        }
    
    
    
        // This event handler is where the time-consuming work is done. 
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker worker = sender as BackgroundWorker;
    
             //this is taken from the msdn example, but you would fill 
             //it in with whatever code is being executed on your bg thread.
            for (int i = 1; i <= 10; i++)
            {
                if (worker.CancellationPending == true)
                {
                    e.Cancel = true;
                    break;
                }
                else
                {
                    // Perform a time consuming operation and report progress.
                    System.Threading.Thread.Sleep(500);
                    worker.ReportProgress(i * 10);
                }
            }
        }
    
        // This event handler updates the progress. 
        private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
        {
            //modify your animation here if you like?
        }
    
        // This event handler deals with the results of the background operation. 
        private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            //your background process is done. tear down your form here..
    
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used to use asmx to handle ajax calls from pages, but I have
I used to use Backbone.js as an easy MVC framework which have build-in routing
I have site http://change.is where i used to use image blend like photoshop. On
We used to use TFS, but have recently moved to another bug tracker. We
I used to use 000WebHost and found that they have a custom version of
I used to use and love RBSplitView, however I failed at reimplementing it programmatically
I used to use Eclipse Galileo, but now I have Helios. Galileo used to
I used to use a guitar tab site and it had a feature where
I used to use procedural-style PHP. Later, I used to create some classes. Later,
I used to use SVN 1.4 on OS X Leopard and everything was fine.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.