Re: Paint event of a panel
From: Aaron Smith (thespirit-1-_at_smithcentral.net)
Date: 11/16/04
- Next message: Jay B. Harlow [MVP - Outlook]: "Re: Paint event of a panel"
- Previous message: Connor T: "Re: Adding controls to a dynamic form?"
- In reply to: Bob Powell [MVP]: "Re: Paint event of a panel"
- Next in thread: Jay B. Harlow [MVP - Outlook]: "Re: Paint event of a panel"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 16 Nov 2004 20:36:51 GMT
Bob,
The example that I found on your site is all well and good, but what
about raised 3d borders? I do not want the sunken 3d panel, I want a
raised one. Will it work the same way if I sublcass the panel and set it
through the CreateParams? Again, I'm not doing this in a custom control,
I'm doing it in the standard windows forms panel.
Aaron
Bob Powell [MVP] wrote:
> Firstly, don't draw borders in the paint event. Add a border to the object
> using the window properties or handle the non-client messages correctly.
> Windows Forms Tips and Tricks has information on the first option.
>
> Secondly, ControlPaint is a total cheat because it often draws on the deskop
> window, not the control window. This is why it leaves unwanted traces of
> itself and why you should draw your borders correctly.
>
-- --- Aaron Smith Remove -1- to E-Mail me. Spam Sucks.
- Next message: Jay B. Harlow [MVP - Outlook]: "Re: Paint event of a panel"
- Previous message: Connor T: "Re: Adding controls to a dynamic form?"
- In reply to: Bob Powell [MVP]: "Re: Paint event of a panel"
- Next in thread: Jay B. Harlow [MVP - Outlook]: "Re: Paint event of a panel"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|