Home > Ask the Microsoft .Net Development Experts > Visual Studio .NET Questions & Answers > I'm getting a lot of flickering on my application
Ask The Win Development Expert: Questions & Answers
EMAIL THIS

I'm getting a lot of flickering on my application

Chris Sells EXPERT RESPONSE FROM: Chris Sells

Pose a Question
Other Win Development Categories
Meet all Win Development Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 31 January 2003
My current VB.NET project is MDI-based. When I jump between the child forms (via the standard Window List menu, for example), they flicker very badly -- I can see every textbox being drawn to the screen! Other Windows applications do not suffer from this, so why do VB.NET apps? Is it possible to prevent this?

>
The amount of flicker you get on an application is very much dependent on the kind of video hardware and driver software you've got running as well as the particular features of your application. However, I've found turning on the following control styles in the form's constructor really helps to reduce flicker:
public MyMdiChildFormM() {
  InitializeComponent();

  // Stop the flicker
  this.SetStyle(ControlStyles.DoubleBuffer, true);
  this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
}

The double buffering style causes the form to do all of the drawing into an off-screen buffer that's drawn to the screen all at once. The all painting in WM_PAINT style disables the normal erase phase of the drawing, making everything happen in a single drawing phase, further reducing flicker.

While double buffering (without the initial erasing of the background) can make all the difference in the user experience, double buffering requires the memory to capture the entire visible region at the current color quality. At 32 bits per pixel, a 200x200 region is 156 K in additional memory used per drawing operation for that region. In memory-constrained systems, this extra memory usage could degrade instead of improve the user experience.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Visual Studio .NET (Archive)
What could be causing this problem with my add New and delete methods?
Is there a .NET equivalent to netsend that I can use in VB.NET?
How can I make a VB6 network app available on the Internet using .NET?
How can I implement an FTP upload using VB.NET?
VB.NET app works on my local drive but not on the network drive
Is developing add-ons for Windows Explorer supported using managed code in .NET?
In C#, how can I change the properties of controls on another form?
How do I add images in listview by using VB.NET?
What is the best technique for connecting to a database from VB.NET?
How do you use control collection in VB.NET?

Visual Studio .NET
Load a DSL domain model instance file programmatically
Calling via command prompt from ASP.NET
On line-by-line analysis in VS .NET
Best approach for merging text files using arrays
Descriptions of symbols in the class view of a .NET solution
What's the best approach for enumerating network resources?
How to enable a line-by-line code walkthrough
Changing a C++ Makefile project to a Utility project
How can I configure Visual Studio.NET 2002 to use the .NET Framework 1.1?
Changing a datagrid column to read-only=false based on variable

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Windows Development - White Papers, News and Expert Advice
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts