Form flashing momentarily before opacity makes it visible 
Author Message
 Form flashing momentarily before opacity makes it visible

I have code in a startup module to start two threads: one to launch a splash
form and another to launch the main form.  The main form increments opacity
from 0 to 1.0.  Problem is, the main form flashes momentarily at full
opacity before disappearing and then fading up as designed.  The
multi-threading works, but seems to somehow be responsible for the momentary
flash. Any ideas how to stop it?
Here is the opacity ramp up code:
Private Sub ShowMainForm()

Dim opacity As Double

frmMain.Opacity = 0

frmMain.Show()

frmMain.Refresh()

For opacity = 0 To 1.0 Step 0.02

frmMain.Opacity = opacity

Next

frmMain.Opacity = 1.0

End Sub

Thanks in advance,

Dean Slindee



Sat, 08 Oct 2005 10:47:52 GMT  
 Form flashing momentarily before opacity makes it visible
Hi Dean,

Where did you create the MainForm? Can you show us a simple demo that the
reproduce the problem? I attempted to implment your logic, but it does not
show the behavior.

Thanks,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

Quote:

>Newsgroups: microsoft.public.dotnet.languages.vb
>Subject: Form flashing momentarily before opacity makes it visible
>Date: Mon, 21 Apr 2003 21:47:52 -0500
>Organization: MindSpring Enterprises
>Lines: 32

>NNTP-Posting-Host: 3f.9c.24.5d
>X-Server-Date: 22 Apr 2003 02:48:40 GMT
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.3663.0
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3663.0
>Path:

cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!newsfeed.icl.net!newsfeed.fjserv.net!beamish.news.atl.earthlink.net!gui
nness.news.atl.earthlink.net!news.atl.earthlink.net!stamper.news.atl.earthli
nk.net!harp.news.atl.earthlink.net!not-for-mail
Quote:
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:103115
>X-Tomcat-NG: microsoft.public.dotnet.languages.vb

>I have code in a startup module to start two threads: one to launch a
splash
>form and another to launch the main form.  The main form increments opacity
>from 0 to 1.0.  Problem is, the main form flashes momentarily at full
>opacity before disappearing and then fading up as designed.  The
>multi-threading works, but seems to somehow be responsible for the
momentary
>flash. Any ideas how to stop it?
>Here is the opacity ramp up code:
>Private Sub ShowMainForm()

>Dim opacity As Double

>frmMain.Opacity = 0

>frmMain.Show()

>frmMain.Refresh()

>For opacity = 0 To 1.0 Step 0.02

>frmMain.Opacity = opacity

>Next

>frmMain.Opacity = 1.0

>End Sub

>Thanks in advance,

>Dean Slindee



Sat, 08 Oct 2005 12:36:00 GMT  
 Form flashing momentarily before opacity makes it visible
Felix,
After moving the project from the offending machine to another one that did
not exhibit the
problem of flashing, I am going to blame the video card driver for this
problem.  I am running
a Matrox G550 video card with Windows .NET Server RC1, but Matrox does not
yet have
a driver released for that operating system.  This is not the first problem.
I can horizontal scroll
a listview and the body moves, but the heading bar does not.  Again,
probably the video driver
is the culprit.
Thanks,
Dean Slindee


Quote:
> Hi Dean,

> Where did you create the MainForm? Can you show us a simple demo that the
> reproduce the problem? I attempted to implment your logic, but it does not
> show the behavior.

> Thanks,

> Felix Wu
> =============
> This posting is provided "AS IS" with no warranties, and confers no
rights.

> --------------------

> >Newsgroups: microsoft.public.dotnet.languages.vb
> >Subject: Form flashing momentarily before opacity makes it visible
> >Date: Mon, 21 Apr 2003 21:47:52 -0500
> >Organization: MindSpring Enterprises
> >Lines: 32

> >NNTP-Posting-Host: 3f.9c.24.5d
> >X-Server-Date: 22 Apr 2003 02:48:40 GMT
> >X-Priority: 3
> >X-MSMail-Priority: Normal
> >X-Newsreader: Microsoft Outlook Express 6.00.3663.0
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3663.0
> >Path:

cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!newsfeed.icl.net!newsfeed.fjserv.net!beamish.news.atl.earthlink.net!gui
nness.news.atl.earthlink.net!news.atl.earthlink.net!stamper.news.atl.earthli

- Show quoted text -

Quote:
> nk.net!harp.news.atl.earthlink.net!not-for-mail
> >Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:103115
> >X-Tomcat-NG: microsoft.public.dotnet.languages.vb

> >I have code in a startup module to start two threads: one to launch a
> splash
> >form and another to launch the main form.  The main form increments
opacity
> >from 0 to 1.0.  Problem is, the main form flashes momentarily at full
> >opacity before disappearing and then fading up as designed.  The
> >multi-threading works, but seems to somehow be responsible for the
> momentary
> >flash. Any ideas how to stop it?
> >Here is the opacity ramp up code:
> >Private Sub ShowMainForm()

> >Dim opacity As Double

> >frmMain.Opacity = 0

> >frmMain.Show()

> >frmMain.Refresh()

> >For opacity = 0 To 1.0 Step 0.02

> >frmMain.Opacity = opacity

> >Next

> >frmMain.Opacity = 1.0

> >End Sub

> >Thanks in advance,

> >Dean Slindee



Tue, 11 Oct 2005 10:30:58 GMT  
 Form flashing momentarily before opacity makes it visible
Hi Dean ,

I am glad that the problem does not occur any more. Also, thank you for
your update information. Your experience may benifit other users :-)  

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

Quote:

>Newsgroups: microsoft.public.dotnet.languages.vb
>Subject: Re: Form flashing momentarily before opacity makes it visible
>Date: Thu, 24 Apr 2003 21:30:58 -0500
>Organization: MindSpring Enterprises
>Lines: 94




Quote:
>NNTP-Posting-Host: 3f.9c.24.56
>X-Server-Date: 25 Apr 2003 02:31:02 GMT
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.3663.0
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3663.0
>Path:

cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!newsfeed.icl.net!newsfeed.fjserv.net!beamish.news.atl.earthlink.net!gui
nness.news.atl.earthlink.net!news.atl.earthlink.net!stamper.news.atl.earthli
nk.net!harp.news.atl.earthlink.net!not-for-mail
Quote:
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:103795
>X-Tomcat-NG: microsoft.public.dotnet.languages.vb

>Felix,
>After moving the project from the offending machine to another one that did
>not exhibit the
>problem of flashing, I am going to blame the video card driver for this
>problem.  I am running
>a Matrox G550 video card with Windows .NET Server RC1, but Matrox does not
>yet have
>a driver released for that operating system.  This is not the first
problem.
>I can horizontal scroll
>a listview and the body moves, but the heading bar does not.  Again,
>probably the video driver
>is the culprit.
>Thanks,
>Dean Slindee


>> Hi Dean,

>> Where did you create the MainForm? Can you show us a simple demo that the
>> reproduce the problem? I attempted to implment your logic, but it does
not
>> show the behavior.

>> Thanks,

>> Felix Wu
>> =============
>> This posting is provided "AS IS" with no warranties, and confers no
>rights.

>> --------------------

>> >Newsgroups: microsoft.public.dotnet.languages.vb
>> >Subject: Form flashing momentarily before opacity makes it visible
>> >Date: Mon, 21 Apr 2003 21:47:52 -0500
>> >Organization: MindSpring Enterprises
>> >Lines: 32

>> >NNTP-Posting-Host: 3f.9c.24.5d
>> >X-Server-Date: 22 Apr 2003 02:48:40 GMT
>> >X-Priority: 3
>> >X-MSMail-Priority: Normal
>> >X-Newsreader: Microsoft Outlook Express 6.00.3663.0
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3663.0
>> >Path:

>cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onli
n

>e.de!newsfeed.icl.net!newsfeed.fjserv.net!beamish.news.atl.earthlink.net!gu
i

>nness.news.atl.earthlink.net!news.atl.earthlink.net!stamper.news.atl.earthl
i
>> nk.net!harp.news.atl.earthlink.net!not-for-mail
>> >Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:103115
>> >X-Tomcat-NG: microsoft.public.dotnet.languages.vb

>> >I have code in a startup module to start two threads: one to launch a
>> splash
>> >form and another to launch the main form.  The main form increments
>opacity
>> >from 0 to 1.0.  Problem is, the main form flashes momentarily at full
>> >opacity before disappearing and then fading up as designed.  The
>> >multi-threading works, but seems to somehow be responsible for the
>> momentary
>> >flash. Any ideas how to stop it?
>> >Here is the opacity ramp up code:
>> >Private Sub ShowMainForm()

>> >Dim opacity As Double

>> >frmMain.Opacity = 0

>> >frmMain.Show()

>> >frmMain.Refresh()

>> >For opacity = 0 To 1.0 Step 0.02

>> >frmMain.Opacity = opacity

>> >Next

>> >frmMain.Opacity = 1.0

>> >End Sub

>> >Thanks in advance,

>> >Dean Slindee



Tue, 11 Oct 2005 10:42:01 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Setting Opacity flashes the form black

2. visible=true/Form.Show makes Form.Location change!

3. Making a user defined text box visible in a custom form

4. Making Components Visible to Multiple Forms

5. App is not visible in alt-tab list unless form is visible in the taskbar

6. Help with Transparency (Opacity) in Windows Forms.

7. Round Form with 50% opacity?

8. A bug in opacity processing and MDI forms

9. vb form opacity property problem.

10. Opacity of a form

11. forms.opacity refuses to work

12. Help with the Opacity property and moving forms

 

 
Powered by phpBB® Forum Software