Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
GeneralRe: Defining form client area Pin
Chris Copeland21-Nov-08 6:17
mveChris Copeland21-Nov-08 6:17 
Questionthe efficieny consideration Pin
Seraph_summer21-Nov-08 3:28
Seraph_summer21-Nov-08 3:28 
AnswerRe: the efficieny consideration Pin
Ennis Ray Lynch, Jr.21-Nov-08 3:34
Ennis Ray Lynch, Jr.21-Nov-08 3:34 
QuestionForm Paint drawing incorrectly Pin
Chris Copeland21-Nov-08 3:14
mveChris Copeland21-Nov-08 3:14 
AnswerRe: Form Paint drawing incorrectly Pin
Ennis Ray Lynch, Jr.21-Nov-08 3:35
Ennis Ray Lynch, Jr.21-Nov-08 3:35 
GeneralRe: Form Paint drawing incorrectly Pin
Chris Copeland21-Nov-08 3:49
mveChris Copeland21-Nov-08 3:49 
GeneralRe: Form Paint drawing incorrectly Pin
Ennis Ray Lynch, Jr.21-Nov-08 3:57
Ennis Ray Lynch, Jr.21-Nov-08 3:57 
GeneralRe: Form Paint drawing incorrectly Pin
Chris Copeland21-Nov-08 4:07
mveChris Copeland21-Nov-08 4:07 
Mm that didn't help D:

Here's a screenshot of the problem:
Screenshot of the moving problem[^]

All I did was move the form below the taskbar/off the bottom of the screen so it draws the bottom border (which is custom drawn) onto the body repeatedly. Then when I do something to raise the OnPaint event again, the form is drawn properly. It's only when the actual form is being moved off the screen that it draws it like that.

I think it's because, when the client is moved off the screen the ClipRectangle in OnPaint is reduced to only the visible area on the screen, so the border is drawn where the end of the client is a the screen.

I might use a new Rectangle rather than ClipRectangle based on
new Rectangle(this.Left, this.Top, this.Width, this.Height);
to obtain the full client region, rather than relying on ClipRectangle.

Thank you!
GeneralRe: Form Paint drawing incorrectly Pin
Guffa21-Nov-08 5:01
Guffa21-Nov-08 5:01 
QuestionGeneric Class with Inheritance Pin
MatthysDT21-Nov-08 2:50
MatthysDT21-Nov-08 2:50 
AnswerRe: Generic Class with Inheritance Pin
cor287921-Nov-08 13:41
cor287921-Nov-08 13:41 
AnswerRe: Generic Class with Inheritance Pin
N a v a n e e t h21-Nov-08 17:33
N a v a n e e t h21-Nov-08 17:33 
GeneralRe: Generic Class with Inheritance Pin
MatthysDT23-Nov-08 19:23
MatthysDT23-Nov-08 19:23 
GeneralRe: Generic Class with Inheritance Pin
cor287924-Nov-08 4:05
cor287924-Nov-08 4:05 
GeneralRe: Generic Class with Inheritance Pin
MatthysDT24-Nov-08 19:11
MatthysDT24-Nov-08 19:11 
QuestionParent form Text Pin
pcjd6321-Nov-08 2:45
pcjd6321-Nov-08 2:45 
AnswerRe: Parent form Text Pin
Pedram Behroozi21-Nov-08 4:57
Pedram Behroozi21-Nov-08 4:57 
GeneralRe: Parent form Text Pin
pcjd6321-Nov-08 5:07
pcjd6321-Nov-08 5:07 
GeneralRe: Parent form Text Pin
pcjd6321-Nov-08 5:18
pcjd6321-Nov-08 5:18 
GeneralRe: Parent form Text Pin
Pedram Behroozi21-Nov-08 5:26
Pedram Behroozi21-Nov-08 5:26 
GeneralRe: Parent form Text Pin
pcjd6321-Nov-08 5:59
pcjd6321-Nov-08 5:59 
GeneralRe: Parent form Text Pin
Pedram Behroozi21-Nov-08 6:42
Pedram Behroozi21-Nov-08 6:42 
QuestionEnable and Disable Certain cells in the WPF DataGrid Pin
chetanN21-Nov-08 2:33
chetanN21-Nov-08 2:33 
QuestionOpening large files to edit Pin
Matjaz-xyz21-Nov-08 1:27
Matjaz-xyz21-Nov-08 1:27 
AnswerRe: Opening large files to edit Pin
Pedram Behroozi21-Nov-08 1:31
Pedram Behroozi21-Nov-08 1:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.