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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:21:59+00:00 2026-05-28T13:21:59+00:00

I have a form with three panels. The top panel contains listboxes, the middle

  • 0

I have a form with three panels. The top panel contains listboxes, the middle panel contains a grid and the bottom panel contains a grid. I need to take a screenshot of the bottom grid but sometimes there are more rows in the grid and you need to scroll to see every row. I want to make the bottom grid the size of the form before I take the screenshot and can do this by setting .Visible to false for the two top panels. My problem is that the screenshot is taken before the form has redrawn itself to show the grid as the size of the form. How can I guarantee that the form has redrawn/repainted before I execute the code to take the screenshot?

I’m using the answer of ArsenMkrt from Capture screenshot of active window? to take the screenshot.

EDIT: The grid is an Infragistics UltraGrid.

  • 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-28T13:21:59+00:00Added an answer on May 28, 2026 at 1:21 pm

    Call the form’s Update() method. If there are any pending paints then you can be sure they’ll be performed and the form is fully drawn. Definitely the case here, hiding the panels requires the form to redraw its background.

    This only works for your own form, not for a window owned by another process. Using the form’s DrawToBitmap() method usually works too (no synchronization required), but not all child controls support it. Notably RichTextBox and WebBrowser as well as many other ActiveX controls don’t implement the underlying Windows message correctly.

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

Sidebar

Related Questions

I have a form that will multiple Panel controls stacked on top of each
I have a panel anchored to top-left_BOTTOM of the form. there is a button
In VB.net 3.5 SP1 I have a Windows Form with three DataGridView controls. One
I have an ASP.NET form with three text inputs, one each for Work Phone,
I have a UserControl that consists of three TextBoxes. On a form I can
If I have a map of three countries, and their borders form the outline
My C# project contains a form. There are some controls across the top of
In a C# form, I have a panel anchored all sides, and inside, a
I have a form with a bunch of panels, and some panels inside groupboxes.
I have a form with a Panel which covers the entire form and serves

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.