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 5931433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:41:38+00:00 2026-05-22T14:41:38+00:00

I am debugging an app that was ported from vb6. It has Application.Doevents littered

  • 0

I am debugging an app that was ported from vb6. It has Application.Doevents littered all over the place which is fine except when I am stepping in the debugger. As soon as I step over an Application.DoEvents() control is transferred to some random area which is expected depending on what is pending in the message pump. How can I elegantly override this method in one place at the application level so it works like this (pseudo code)

protected override void Application.Doevents()
{
  if (!Debugger.IsAttached)
     Application.Doevents()
}  

without putting #ifdef DEBUG’s all over the place.
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-05-22T14:41:39+00:00Added an answer on May 22, 2026 at 2:41 pm

    There is no need – or possibility – to override it.
    Just create a static class with a static method in it and put the code you want to have inside. Change all calls to Application.DoEvents to calls to that static method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am debugging an application that I ported from Windows, to *nix, a little
I'm currently debugging my app which is quite complex and has up to 5
I have an image in an app that shows up fine when debugging on
I've made an android app that works fine in the emulator and when debugging
I have a complex C# project that I ported over from C++ and now
Here's the scenario. I'm debugging my own app (C/C++) which is using some library
I'm debugging an apparent concurrency issue in a largish app that I hack on
I have an app that is available from the Android Market. Some users have
Im developing an app that has to run in the background. It's a location
I am writing a windows forms app that can launch a console for debugging.

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.