Click here to Skip to main content
15,888,286 members
Home / Discussions / C#
   

C#

 
AnswerRe: Explicitly call IDispose() method Pin
Luc Pattyn8-Jul-09 10:46
sitebuilderLuc Pattyn8-Jul-09 10:46 
GeneralRe: Explicitly call IDispose() method Pin
Richard Blythe8-Jul-09 11:08
Richard Blythe8-Jul-09 11:08 
AnswerRe: Explicitly call IDispose() method Pin
N a v a n e e t h8-Jul-09 17:25
N a v a n e e t h8-Jul-09 17:25 
GeneralRe: Explicitly call IDispose() method Pin
Luc Pattyn8-Jul-09 22:50
sitebuilderLuc Pattyn8-Jul-09 22:50 
GeneralRe: Explicitly call IDispose() method Pin
N a v a n e e t h9-Jul-09 16:40
N a v a n e e t h9-Jul-09 16:40 
AnswerRe: Explicitly call IDispose() method Pin
Curtis Schlak.8-Jul-09 17:39
Curtis Schlak.8-Jul-09 17:39 
GeneralRe: Explicitly call IDispose() method Pin
Daniel Grunwald9-Jul-09 3:38
Daniel Grunwald9-Jul-09 3:38 
QuestionCustom Treeview with Overridden OnPaint & WndProc Pin
VengefulSakhmet8-Jul-09 9:38
VengefulSakhmet8-Jul-09 9:38 
I am attempting to do a custom OnPaint on a custom Treeview with a lot of bumps along the way. At this point in the game, I'm just trying to get a purple rectangle to print out anywhere involving this TreeView. I'll work on the bounds afterwards.

I found out the long way that WndProc turns off OnPaint and am trying to now to override WndProc, but I have absolutely no idea what to pass to OnPaint seeing this is my first attempt at GDI and from all the examples I've been looking at OnPaint appears to be called implicitly by other Win Forms. Please point me in the right direction.

public class myProfileTree : System.Windows.Forms.TreeView
{
protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;
SolidBrush brush = new SolidBrush(Color.MediumOrchid);
Rectangle blueRectangle = new Rectangle(50, 50, 200, 100);
g.FillRectangle(brush, blueRectangle);
}

protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case(15):
{
OnPaint( Confused | :confused: );
break;
}
default:
{
break;
}
}
base.WndProc(ref m);
}
}
AnswerRe: Custom Treeview with Overridden OnPaint & WndProc Pin
Richard Blythe8-Jul-09 9:44
Richard Blythe8-Jul-09 9:44 
GeneralRe: Custom Treeview with Overridden OnPaint & WndProc Pin
VengefulSakhmet8-Jul-09 10:55
VengefulSakhmet8-Jul-09 10:55 
GeneralRe: Custom Treeview with Overridden OnPaint & WndProc Pin
Richard Blythe8-Jul-09 11:14
Richard Blythe8-Jul-09 11:14 
GeneralRe: Custom Treeview with Overridden OnPaint & WndProc Pin
VengefulSakhmet8-Jul-09 11:57
VengefulSakhmet8-Jul-09 11:57 
QuestionCopy Excel Rows using C# Pin
kasi148-Jul-09 9:01
kasi148-Jul-09 9:01 
AnswerRe: Copy Excel Rows using C# Pin
Manas Bhardwaj8-Jul-09 9:35
professionalManas Bhardwaj8-Jul-09 9:35 
GeneralRe: Copy Excel Rows using C# Pin
kasi148-Jul-09 10:52
kasi148-Jul-09 10:52 
GeneralRe: Copy Excel Rows using C# Pin
EliottA8-Jul-09 11:04
EliottA8-Jul-09 11:04 
GeneralRe: Copy Excel Rows using C# Pin
kasi148-Jul-09 13:10
kasi148-Jul-09 13:10 
QuestionSend email in winform with Yahoo or Gmail account ? Pin
Mohammad Dayyan8-Jul-09 7:47
Mohammad Dayyan8-Jul-09 7:47 
AnswerRe: Send email in winform with Yahoo or Gmail account ? Pin
Manas Bhardwaj8-Jul-09 7:54
professionalManas Bhardwaj8-Jul-09 7:54 
GeneralRe: Send email in winform with Yahoo or Gmail account ? Pin
Mohammad Dayyan8-Jul-09 8:27
Mohammad Dayyan8-Jul-09 8:27 
QuestionEncript Xml Pin
kibromg8-Jul-09 7:27
kibromg8-Jul-09 7:27 
AnswerRe: Encript Xml Pin
Christian Graus8-Jul-09 8:14
protectorChristian Graus8-Jul-09 8:14 
QuestionEvent log query... very odd! Pin
lane0p28-Jul-09 7:06
lane0p28-Jul-09 7:06 
AnswerRe: Event log query... very odd! Pin
Manas Bhardwaj8-Jul-09 7:57
professionalManas Bhardwaj8-Jul-09 7:57 
GeneralRe: Event log query... very odd! Pin
lane0p28-Jul-09 9:23
lane0p28-Jul-09 9:23 

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.