Hi, 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