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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:06:06+00:00 2026-05-11T17:06:06+00:00

I have a userControl I’m doing some Painting to, and when the control is

  • 0

I have a userControl I’m doing some Painting to, and when the control is moved to the edge of the screen, or moved so that the Vista Taskbar overlaps it, the screen edge/taskbar edge is being drawn to the control, leaving ugly lines over the paintable area of the control.

What is the best way to detect this and call Invalidate on the control? The “Moved” and “LocationChanged” events apparently deal with the movement of the control within its parent container, not with a change in screen location.
I believe the same thing will occur when the control is overlapped by another window in Windows XP, but I haven’t tested that yet. Same question applies under that circumstance.

I am currently drawing directly to the control’s Graphics object, which I believe is the root of the problem. Would it be better to draw to the Control’s BackGroundImage as an attempt to sidestep this issue?

Note: This is a significant rephrasing of an earlier question which was phrased very badly. I felt that starting a new question was the thing to do, rather than try to repair the nonsense I had written.

EDIT: It turns out that the taskbar is not causing the problem, just the bottom screen edge. I had thought that the taskbar was causing problems as well, but it looks like I was wrong

  • 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-11T17:06:07+00:00Added an answer on May 11, 2026 at 5:06 pm

    Yes you can draw control’s background to give illusion problem free drawing.

    Are you trying to draw on the clipped area (Clip Rectangle) of the graphics object or using whole surface of it? I think whenever another window or object hides an other object windows sends it repaint message and with that it passes the area that needs to be redrawn (clip rectangle).

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

Sidebar

Related Questions

I have a UserControl that does some cool video capture stuff. Now I slapped
I have a UserControl with something that does some background work. When thing has
I have a UserControl that displays some text of a DP of the UserControl.
I have UserControl that holds Infragistics Graph control. On the TreeView sub node's right
I have a usercontrol that I'm adding as a control of a main form
I have a UserControl-derived control the displays some information fetched from a web server.
I have a UserControl in WPF that contain a textBox. My user control is
I have a UserControl that adds other UserControls, but I want the latest control
I have a UserControl and it contains a Button . Now, in some Windows
I have an UserControl that contains a Button : <UserControl> <Button> </UserControl> I want

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.