Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm working on an application using the .Net Compact Framewok have got an annoying little problem. The problem is basically a visible flash that is visible on a tab page.

 

I have create my own component inherited from TabPage, and have then overridden the OnPaint method (essentially to draw an image to the tab page), i have done this by creating a graphics object, painting the bitmap to it (along with a few other things), then painting it to the screen. The problem occurs when there are other Controls on that tab page (which also incorporate buffering to a graphics object). The problem is essentially that the tabpage is not drawn where there is a control placed on it, so untill that controls OnPaint method had ran through, it just appears as a white square, is there any way of avoiding this? I essentially want to draw the complete tabpage, before starting to draw the controls....

Anybody looking for a graduate programmer (Midlands, England)?
Posted
Problem solved. For anyone else with this problem the solution I found was to call the .Refresh method of all the controls on the tabpage before painting the buffer to it. This seems to ensure that everything is painted at the same time.
Anybody looking for a graduate programmer (Midlands, England)?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...