Sternr,
Where are you executing the code to draw the line? My guess is that it
is not in the OnPaint method of the form, or in an event handler for the
Paint event.
The reason this doesn't work is that programs with a UI in Windows have
a message pump. This is basically a while loop that gets messages from the
OS, and then performs an action based on that message. Being notified to
paint itself is one of those messages.
If you are not overriding the OnPaint method, or adding an event handler
to the Paint event and performing your drawing there, then when the form is
told to repaint itself, it has no clue that a line should be there, and then
erases what you had already painted.
Hope this helps.
"sternr" <St****@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
Hey,
I have a simple Win Forms that draws a line (graphics.drawLine) on the
current form,
All is well until the user resizes the form - after the resize,
When I draw a line on a part of the form that was not visible befure
the resize,
It does nothing! I mean I get no exception but it doesnt draw the line!
Any suggestions?
Thanks ahead
--sternr