Equivalent of VB6 DoEvents in C#

Posted on 2007-10-13
Last Modified: 2013-12-17
What is the equivalent of VB6 DoEvents in C#?

I have a calculation intensive loop in which I display a progress message in a textbox from time to time.

But when I actually run the program, the textbox does not update immediately.

Without programming a separate thread, is it possible to do this?
Question by:rajesh_khater
    1 Comment
    LVL 1

    Accepted Solution

    The C# equivalent for the VB6 DoEvents is
    public static void DoEvents ()

    You will find an excellent example and explanation at the following url:

    -- perkinda

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Suggested Solutions

    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now