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

C#

 
GeneralRe: hello Pin
Mazdak19-Feb-04 7:22
Mazdak19-Feb-04 7:22 
GeneralRe: hello Pin
Anonymous19-Feb-04 7:27
Anonymous19-Feb-04 7:27 
GeneralSaving the Images/Pictures/OLE objects from PowerPoint Pin
AliIMCIn19-Feb-04 7:02
AliIMCIn19-Feb-04 7:02 
GeneralRe: Saving the Images/Pictures/OLE objects from PowerPoint Pin
John Fisher19-Feb-04 7:13
John Fisher19-Feb-04 7:13 
GeneralRe: Saving the Images/Pictures/OLE objects from PowerPoint Pin
Heath Stewart19-Feb-04 8:46
protectorHeath Stewart19-Feb-04 8:46 
Generalcom port info Pin
elraton19-Feb-04 6:24
elraton19-Feb-04 6:24 
Generalbring DrawRectangle(...) to front Pin
TweeZz19-Feb-04 3:55
TweeZz19-Feb-04 3:55 
GeneralRe: bring DrawRectangle(...) to front Pin
Heath Stewart19-Feb-04 5:02
protectorHeath Stewart19-Feb-04 5:02 
The problem is that the rectangle is being drawn before the carpets. It's all a matter of order. Draw the carpets first, then draw the rectangle.

If you're looking to owner-draw, handle the Paint event of a control (not all fire it, though) or - if you're deriving from a control - override the OnPaint method. You'll get an initialized Graphics object that you can use. If you need to perform a single paint operation, you can also use Control.CreateGraphics, but this will not be redrawn if the region you painted gets invalidated (that's what the Paint event is for).

For more information on drawing in .NET, see the many examples[^] here on CodeProject.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: bring DrawRectangle(...) to front Pin
John Fisher19-Feb-04 5:05
John Fisher19-Feb-04 5:05 
GeneralRe: bring DrawRectangle(...) to front Pin
John Fisher19-Feb-04 13:26
John Fisher19-Feb-04 13:26 
GeneralRe: bring DrawRectangle(...) to front Pin
TweeZz19-Feb-04 22:03
TweeZz19-Feb-04 22:03 
GeneralGeting system fonts Pin
Itanium19-Feb-04 0:59
Itanium19-Feb-04 0:59 
GeneralRe: Geting system fonts Pin
Nick Parker19-Feb-04 3:12
protectorNick Parker19-Feb-04 3:12 
GeneralLISTVIEW C# Pin
youssef19-Feb-04 0:54
youssef19-Feb-04 0:54 
GeneralRe: LISTVIEW C# Pin
Heath Stewart19-Feb-04 4:52
protectorHeath Stewart19-Feb-04 4:52 
GeneralRe: LISTVIEW C# Pin
Heath Stewart19-Feb-04 10:50
protectorHeath Stewart19-Feb-04 10:50 
GeneralRe: LISTVIEW C# Pin
youssef19-Feb-04 22:14
youssef19-Feb-04 22:14 
GeneralRe: LISTVIEW C# Pin
Heath Stewart20-Feb-04 3:00
protectorHeath Stewart20-Feb-04 3:00 
GeneralRe: LISTVIEW C# Pin
youssef20-Feb-04 6:47
youssef20-Feb-04 6:47 
GenerallistView selection Pin
Snowjim18-Feb-04 22:49
Snowjim18-Feb-04 22:49 
GeneralRe: listView selection Pin
Heath Stewart19-Feb-04 4:50
protectorHeath Stewart19-Feb-04 4:50 
GeneralRe: listView selection Pin
Snowjim19-Feb-04 11:46
Snowjim19-Feb-04 11:46 
GeneralRe: listView selection Pin
Heath Stewart19-Feb-04 11:57
protectorHeath Stewart19-Feb-04 11:57 
Generaljava with c# Pin
bel g18-Feb-04 20:56
sussbel g18-Feb-04 20:56 
GeneralRe: java with c# Pin
Heath Stewart19-Feb-04 4:48
protectorHeath Stewart19-Feb-04 4:48 

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.