PC Review Forums Newsgroups Microsoft DotNet Microsoft VB .NET Refresh/Blinking Problems with VB.NET Application

Reply

Refresh/Blinking Problems with VB.NET Application

 
Thread Tools Rate Thread
Old 21-09-2006, 08:47 AM   #1
Mark Thompson
Guest
 
Posts: n/a
Default Refresh/Blinking Problems with VB.NET Application


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.

  Reply With Quote
Old 21-09-2006, 10:05 AM   #2
gene kelley
Guest
 
Posts: n/a
Default Re: Refresh/Blinking Problems with VB.NET Application

On 21 Sep 2006 00:47:54 -0700, "Mark Thompson" <choffi@dsl.pipex.com> wrote:

>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

  Reply With Quote
Old 21-09-2006, 02:14 PM   #3
Mark Thompson
Guest
 
Posts: n/a
Default Re: Refresh/Blinking Problems with VB.NET Application

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.

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off