Click here to Skip to main content
15,892,059 members
Home / Discussions / C#
   

C#

 
QuestionGDI Drawing over controls Pin
aparsons_cp9-Aug-07 2:00
aparsons_cp9-Aug-07 2:00 
AnswerRe: GDI Drawing over controls Pin
Luc Pattyn9-Aug-07 2:17
sitebuilderLuc Pattyn9-Aug-07 2:17 
GeneralRe: GDI Drawing over controls Pin
Martin#9-Aug-07 2:21
Martin#9-Aug-07 2:21 
GeneralRe: GDI Drawing over controls Pin
Luc Pattyn9-Aug-07 2:32
sitebuilderLuc Pattyn9-Aug-07 2:32 
GeneralRe: GDI Drawing over controls Pin
Martin#9-Aug-07 2:41
Martin#9-Aug-07 2:41 
GeneralRe: GDI Drawing over controls Pin
aparsons_cp14-Aug-07 2:30
aparsons_cp14-Aug-07 2:30 
GeneralRe: GDI Drawing over controls Pin
aparsons_cp15-Aug-07 23:21
aparsons_cp15-Aug-07 23:21 
GeneralRe: GDI Drawing over controls Pin
Luc Pattyn16-Aug-07 1:26
sitebuilderLuc Pattyn16-Aug-07 1:26 
Hi Andrew,


aparsons_cp wrote:
How does one get the visible region of a partly obscured window? Can a window detect when it is being obscured?


I see no way to get that. The Paint handler gets a Graphics which holds a clipping
rectangle (obviously not good enough to give the details), and a clip region which
is not minimal (seems to be rectangular too). I tested the clip region by feeding
some points to Region.IsVisible() and it seems to ignore cover ups.

There is no cover up event; Paint gets fired when the Control gets (partially)
uncovered, not (partially) covered.

So I am not convinced ControlPaint.DrawReversibleLine() is the right tool for you;
I understand the reversible is nice, but you clearly want to draw to a Form,
not to the screen. (Actually the whole ControlPaint class seems wrong, the
ButtonHover/Leave example also does not take into account a possible cover up).

BTW: seems like a good topic for a CP article !

Smile | :)


Luc Pattyn [Forum Guidelines] [My Articles]


this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google


GeneralRe: GDI Drawing over controls Pin
JVilmaire19-Aug-07 15:13
JVilmaire19-Aug-07 15:13 
GeneralRe: GDI Drawing over controls Pin
Luc Pattyn19-Aug-07 22:31
sitebuilderLuc Pattyn19-Aug-07 22:31 
QuestionHelp regarding timer control Pin
anu819-Aug-07 1:42
anu819-Aug-07 1:42 
AnswerRe: Help regarding timer control Pin
kubben9-Aug-07 1:48
kubben9-Aug-07 1:48 
GeneralRe: Help regarding timer control Pin
anu819-Aug-07 2:43
anu819-Aug-07 2:43 
GeneralRe: Help regarding timer control Pin
kubben9-Aug-07 6:04
kubben9-Aug-07 6:04 
AnswerRe: Help regarding timer control Pin
Martin#9-Aug-07 2:53
Martin#9-Aug-07 2:53 
GeneralRe: Help regarding timer control Pin
anu819-Aug-07 3:27
anu819-Aug-07 3:27 
GeneralRe: Help regarding timer control Pin
Martin#9-Aug-07 3:35
Martin#9-Aug-07 3:35 
AnswerRe: Help regarding timer control Pin
kubben9-Aug-07 6:06
kubben9-Aug-07 6:06 
QuestionCOM in C# Pin
Stevo Z9-Aug-07 1:30
Stevo Z9-Aug-07 1:30 
Questioncomparing image Pin
Xmen Real 9-Aug-07 1:26
professional Xmen Real 9-Aug-07 1:26 
AnswerRe: comparing image Pin
kubben9-Aug-07 1:50
kubben9-Aug-07 1:50 
QuestionSSL in Pop3 connection Pin
DKalepu9-Aug-07 1:16
DKalepu9-Aug-07 1:16 
AnswerRe: SSL in Pop3 connection Pin
m@u9-Aug-07 10:16
m@u9-Aug-07 10:16 
GeneralRe: SSL in Pop3 connection Pin
DKalepu9-Aug-07 19:24
DKalepu9-Aug-07 19:24 
QuestionMSG Box Script Pin
kibromg9-Aug-07 0:51
kibromg9-Aug-07 0:51 

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.