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

  • Home
  • SEARCH
  • 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 618597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:33:48+00:00 2026-05-13T18:33:48+00:00

In my tool I use a a panel to change pages. Each page has

  • 0

In my tool I use a a panel to change pages. Each page has it’s own panel and when I change a page I send the panel with the controls. On the panel I use as the canvas I have the following paint event:

    private void panelContent_Paint(object sender, PaintEventArgs e)
    {
        e.Graphics.CompositingQuality = CompositingQuality.HighQuality;
        e.Graphics.SmoothingMode = SmoothingMode.HighQuality;

        // Paints a border around the panel to match the treeview control
        e.Graphics.DrawRectangle(Pens.CornflowerBlue,
            e.ClipRectangle.Left,
            e.ClipRectangle.Top,
            e.ClipRectangle.Width - 1,
            e.ClipRectangle.Height - 1);

        e.Graphics.Flush();

        base.OnPaint(e);
    }

This method basically draws a nice border around the panel so it look better. For some reason when I move a another form above this panel the lines that make up the border start to run a little. Occasionally small lines will be drawn from the border too. The problem only happens for a few seconds before the entire panel redraws again. Is there anything I can do to prevent this from happening?

  • 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-13T18:33:49+00:00Added an answer on May 13, 2026 at 6:33 pm

    ClipRectangle tells you what part of the control needs to be repainted. If you’re moving something over it, this is probably going to be the intersection of your object and the one being moved. You can use this information to more efficiently repaint your control.

    You probably want to draw the rectangle from (0, 0) to (panelContent.Width-1, panelContent.Height-1).

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

Sidebar

Related Questions

We have online SharePoint site and we want to use tool or any way
Does anyone have a tool to use in order to differentiate an RSA public
I have read that Windsor is the best DI/IOC tool to use so I
What is 'jQuery UI ThemeRoller Developer Tool' Use For ? I have this tool
What's the popular tool people use in Unix to parse/analyze log files? Doing counting,
I would like to know what kind of tool you use for writing your
I've been looking for a good PHP ORM tool to use, and I recently
I use this tool called Lazy C++ which breaks a single C++ .lzz file
I use SpringSource Tool Suite 3.0.1, Tomcat server 7.0.21, maven-2.2.1. I successfully built my
What tool do you use to only zip up the source code of an

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.