Re: About drawing something on a Control.
- From: Göran Andersson <guffa@xxxxxxxxx>
- Date: Fri, 05 Oct 2007 09:55:56 +0200
linuxfedora@xxxxxxxxxxxx wrote:
if i want to draw something on the control, then how can i do it?
For example, when i call function named WriteSomeThingOnPanel(),
Then there will be a line drawn on Panel?
I have tried to get the Graphics of the Panel by
Graphic.FromHwnd(panel.Handle);
then draw the line, but nothing can be drawn?Thanks
You use the Paint event, just as in the code that you posted. The event arguments contains a reference to the graphics object that should be used for drawing, just as in the code that you posted.
To trigger the Paint event, you call the Invalidate method on the control.
--
Göran Andersson
_____
http://www.guffa.com
.
- References:
- About drawing something on a Control.
- From: linuxfedora
- Re: About drawing something on a Control.
- From: Göran Andersson
- Re: About drawing something on a Control.
- From: linuxfedora
- About drawing something on a Control.
- Prev by Date: Re: Using a Broadcast message on an intranet
- Next by Date: Re: ReplacerStream
- Previous by thread: Re: About drawing something on a Control.
- Index(es):
Relevant Pages
|