Refresh/Blinking Problems with VB.NET Application

M

Mark Thompson

Hi,

I have created a CAD type application in VB.NET. I have a strange
problem which I have been unable to resolve.

Sometimes, when I open a modal dialog on the form, the imprint of
whatever happens to be behind the main form (e.g. word document,
desktop etc.) flashes up briefly while the control is drawn. Also,
sometimes when dialogs are closed, the whole main form briefly
disappears (for maybe 0.5 of a second) and then reappears.

I am using a Panel on the main form which uses GDI+ if that helps at
all.

Any advice as to what I might be able to do to resolve this annoying
problem would be much appreciated. At the moment it makes my
application look a little bit unprofessional.

Thanks,

Mark.
 
G

gene kelley

Hi,

I have created a CAD type application in VB.NET. I have a strange
problem which I have been unable to resolve.

Sometimes, when I open a modal dialog on the form, the imprint of
whatever happens to be behind the main form (e.g. word document,
desktop etc.) flashes up briefly while the control is drawn. Also,
sometimes when dialogs are closed, the whole main form briefly
disappears (for maybe 0.5 of a second) and then reappears.

I am using a Panel on the main form which uses GDI+ if that helps at
all.

Any advice as to what I might be able to do to resolve this annoying
problem would be much appreciated. At the moment it makes my
application look a little bit unprofessional.

Thanks,

Mark.
(VB2005)
I have had similar issues with modal forms where there is some significant owner
drawn controls in the app. In particular, the problem I had had to do with using the
Hide statement in the modal form - it behaved as you described. At the same time,
but to a lesser degree, if there is a Close statement in the modal form, it should be
replaced with a DialogResult statement.

I'm told by others that these are "bug". Will have to wait for a service pack to see
if the issue is resolved.

Gene
 
M

Mark Thompson

Thanks for that Gene.

Unfortunately it is as I feared. It seemed like such a low-level thing
that I could not see what I was doing wrong. Interestingly though, I am
using VS.NET 2003/.NET 1.1. I was kind of hoping that this may be fixed
in 2005/2.0 but obviously not.

If anyone else knows of any workaround for this, even if it means
low-level API or similar stuff I would be grateful.

Thanks,

Mark.
 

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