Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / August 2005

Tip: Looking for answers? Try searching our database.

Background shows while switching between forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Naveed Ahmed - 09 Aug 2005 18:26 GMT
I have an multi-form application, which uses owner drawn buttons that use
bitmaps. I switch between forms using:

       public void ActivateForm(FormBase form)
       {
           if (form ==  this.activeForm)
               return;

           form.Show();
           form.Enabled = true;
           this.activeForm.Hide();
           this.activeForm = form;
       }

The switching works fine, but a very brief moment when the switching occurs,
the background shows, causing a flicker-like effect. I should mention that
the application is on .NET CF. I am also compiling it to .NET, where all the
code is shared except for a hand full of lines using #if(PocketPC). The
flicker-like effect is also present on the PC, but much less so, probably
because of the faster hardware.

I have tried double-buffering drawing the whole form, using the form's
OnPaint() rather than the controls' OnPaint(), but this seemed to slow down
the drawing further, and the flicker is more pronounced on the desktop but
shows a white background, rather than what is behind the form. And the
bitmap buttons dont even show up on .NET CF, just the background. Looks to
me like double-buffering is out.

The bitmap buttons use transparent bitmaps, but I tried using regular
bitmaps, but the problem still exists, in both CF and regular .NET.
"Jeffrey Tan[MSFT]" - 10 Aug 2005 10:19 GMT
Hi Naveed,

Thanks for your post.

Currently with your post description, it is hard for me to reproduce out
your problem on my side. Can you post a little sample .Net project for us
to reproduce the problem? Then we can understand your problem much better
and provide some useful reply.

Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Naveed Ahmed - 10 Aug 2005 19:39 GMT
Jeffrey,

Thanks for your reply. A project including the images used is here:
http://naveed.net/rPad.zip

The CF solutions is rPad.sln and the desktop solution is rPadPC.sln.

Thanks in advance.

Naveed

> Hi Naveed,
>
[quoted text clipped - 12 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
"Jeffrey Tan[MSFT]" - 16 Aug 2005 03:03 GMT
Hi Naveed,

Does my reply make sense to you? Do  you still have any concern, please
feel free to tell me. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Naveed Ahmed - 17 Aug 2005 20:26 GMT
Thanks for the reply. For some reason, Outlook Express isn't showing your
last message. I just saw it with the web based client.

I was trying to avoid using the same form, as the business logic is very
different on every form.

The project is really targeted to the Pocket PC (the project I uploaded is
in VGA mode, not QVGA mode), so SetStyle and ControlStyles dont work.

I found a funny work-around. I hope you can shed some light on it. When
Wisbar Advance http://www.lakeridgesoftware.com/wisbar/ is running, the
flickering especially the task bar, showing up, is dramatically reduced.
This doesn't happen with the other Wisbar editions.

Naveed

> Hi Naveed,
>
[quoted text clipped - 6 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
"Jeffrey Tan[MSFT]" - 19 Aug 2005 08:13 GMT
Hi Naveed,

Thanks for your feedback.

I think doing partial painting on the form is a way of reducing flicker.
Currently, I can not share any more information on the product you
provided, because it is a third-party product. I hope some other community
members may help you on this.

Thanks for your understanding.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.