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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:20:00+00:00 2026-05-26T11:20:00+00:00

Invoking the WinForms Control.Refresh method is described in MSDN as: Forces the control to

  • 0

Invoking the WinForms Control.Refresh method is described in MSDN as:

Forces the control to invalidate its client area and immediately redraw itself and any child controls.

I am debugging an intermittent issue that seems to occur when the attached display is switching scanout signals (effectively changing resolution), in which a Control.Refresh appears to not be generating the expected Control.OnPaint call. I am instrumenting the application to get more information, however I’m curious if this could actually be the runtime deciding not to invoke the OnPaint because it detects the display is momentarily blanked out.

This seems unlikely to me, and I expect I’ll find some other smoking gun, but I’m posting on the off-chance somebody else has seen this in the wild, and has some recommendations for handling this.

  • 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-26T11:20:01+00:00Added an answer on May 26, 2026 at 11:20 am

    No, it’s not guaranteed. If the control does not have a screen to draw on, it won’t fire the paint message.

    But once the control is on the screen again, the paint message should fire again.

    Are you trying to paint debug information? If the control isn’t on the screen, what are you expecting to happen when you call refresh?

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

Sidebar

Related Questions

When invoking the method push_back from std::vector , its size is incremented by one,
I have a method invoking bean which calls a method to perform some sort
why invoking a method by reflection is much slower than making a interface then
When invoking a method in server side I can get a list of errors
I am invoking a static method Parse on a type via reflection because I
Background: I'm invoking a web service method which returns a JSON string. This string
I am invoking PHP cURL method on a server and the response is XML
guys,i am confused by invoking the following method: Calendar.getInstance().get(Calendar.WEEK_OF_YEAR) ,the result got from that
Is invoking destroy (native method) enough, or should I take additional measures like manually
I am invoking a asynchronous PageMethod call from the client-side. The backend code is

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.