Drawing

W

Weste

On my form is a panel which is used for drawing and several text boxes. All
of my code to draw my object is in the OnPaint method. When the form loads,
the drawing is done fine. However, when the TAB key is clicked from within
one of the text boxes, the drawing disappears. It seems as if the TAB key is
triggering the OnPaint. However, not all of the code within the OnPaint is
firing. Is there a way to fix this problem? Thanks.
 
P

Peter Duniho

On my form is a panel which is used for drawing and several text boxes. All
of my code to draw my object is in the OnPaint method. When the form loads,
the drawing is done fine. However, when the TAB key is clicked from within
one of the text boxes, the drawing disappears. It seems as if the TAB key is
triggering the OnPaint. However, not all of the code within the OnPaint is
firing. Is there a way to fix this problem? Thanks.

Undoubtedly there is a way to fix the problem.

But you have not posted any code demonstrating what you're doing, so
it's not really possible for anyone to explain the way to fix the
problem.

You should post a concise-but-complete sample of code that reliably
demonstrates the problem. Only then would it be most likely that
someone could help fix the problem.

Pete
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,


--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
Weste said:
On my form is a panel which is used for drawing and several text boxes.
All
of my code to draw my object is in the OnPaint method. When the form
loads,
the drawing is done fine. However, when the TAB key is clicked from
within
one of the text boxes, the drawing disappears. It seems as if the TAB key
is
triggering the OnPaint. However, not all of the code within the OnPaint
is
firing. Is there a way to fix this problem? Thanks.

Take a look at Bob Powell's website he has a good number of examples of
using GDI+
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top