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?
Thanks,
Gidi. 4 3606
Hi,
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?
Thanks,
Gidi.
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.
--
HTH,
Kevin Spencer
Microsoft MVP
DSI PrintManager, Miradyne Component Libraries: http://www.miradyne.net
"Gidi" <sh*****@hotmail.com.dontspamwrote in message
news:D5**********************************@microsof t.com...
Hi,
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?
Thanks, Gidi.
Thanks Kevin,
the problem is that my form heightis smaller then my panel height, so i have
to scroll the panel up and down to see all it's content. now when i scroll
the panel the paint event starts again, but not from point (0,0) of the
orginal panel but from the point that the scroll stopped and i don't want
that. I want to draw the lines one time from height = 0 to panel's height,
without calling the drawing line again after scrolling.
how can i do it?
Thanks,
Gidi.
"Kevin Spencer" wrote:
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.
--
HTH,
Kevin Spencer
Microsoft MVP
DSI PrintManager, Miradyne Component Libraries: http://www.miradyne.net
"Gidi" <sh*****@hotmail.com.dontspamwrote in message
news:D5**********************************@microsof t.com...
Hi,
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?
Thanks,
Gidi.
you can't. Drawing using the Graphics object is via GDI+. It means you will
have to redraw everything on every paint event.
If you don't, your drawing will be cleared when another window will hover
your panel and you will lost your drawing.
For performance you can use double buffering and pre initialization of some
of the objects.
"Gidi" <sh*****@hotmail.com.dontspamwrote in message
news:1C**********************************@microsof t.com...
Thanks Kevin,
the problem is that my form heightis smaller then my panel height, so i
have
to scroll the panel up and down to see all it's content. now when i scroll
the panel the paint event starts again, but not from point (0,0) of the
orginal panel but from the point that the scroll stopped and i don't want
that. I want to draw the lines one time from height = 0 to panel's height,
without calling the drawing line again after scrolling.
how can i do it?
Thanks,
Gidi.
"Kevin Spencer" wrote:
>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.
-- HTH,
Kevin Spencer Microsoft MVP
DSI PrintManager, Miradyne Component Libraries: http://www.miradyne.net
"Gidi" <sh*****@hotmail.com.dontspamwrote in message news:D5**********************************@microso ft.com...
Hi,
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?
Thanks, Gidi.
This discussion thread is closed Replies have been disabled for this discussion. Similar topics
2 posts
views
Thread by Champika Nirosh |
last post: by
|
6 posts
views
Thread by iwdu15 |
last post: by
|
2 posts
views
Thread by George |
last post: by
|
1 post
views
Thread by Niels Jensen |
last post: by
|
1 post
views
Thread by R2D2 |
last post: by
|
11 posts
views
Thread by dongarbage |
last post: by
|
12 posts
views
Thread by Petra Rohmer |
last post: by
| | | | | | | | | | | | |