The Paint event occurs every time the Control needs to be painted, so you
just put your code in there, and it will be redrawn automatically whenever
the Panel is repainted.
I found out that i can draw on the panel with panel1.Paint event.
my question now is, how can i draw lines in a specific location, at when
the
form loads and not call the paint event again with the lines will be
erased ?
Thanks,
Gidi.
"Gidi" wrote:
Hi,
I've windows form, in this form i've a panel.
I want to draw lines inside the panel using the panel coordinates( meaing
that the left upper corner of the panel is 0,0), how can i do it?
Re: problems with Paint() event of the control ... Are you saying that when the form is minimized the panel Paint event fires... and you draw the contents anyway? ... > I have class which contains Panel control(using for drawing).... (microsoft.public.dotnet.framework.drawing)
correct "mental model" of graphics of a control ? ... For a while I had a "mental model" that for controls (say, a panel) that the ...Graphics object you would get inside the Paint event by doing: ... it was "automagically" disposed when the Paint event was exited. ... (microsoft.public.dotnet.framework.drawing)
Re: Drawing Lines On Panels ... The Panel control does have a Paint event.... > To draw on it, i create Image, draw on it and then insert that image into ... >> int, int, int, int)) is currently supported directly through the CF. So ... (microsoft.public.pocketpc.developer)
Re: Drawing Lines On Panels ... > The Panel control does have a Paint event.... >> And Panel cant give Graphics, nothing, except Form, can do that. ... >> Only way i found is using PictureBox.... >> To draw on it, i create Image, draw on it and then insert that image ... (microsoft.public.pocketpc.developer)
Re: Using (Create)Graphics outside Paint event ... however you use the Paint event too, and for a large number of panels ...control and this automatically clear the control ... in-memory bitmap and apply it to a picture control placed in then panel... In this way the bitmap is always present, ... (microsoft.public.dotnet.framework.compactframework)