Click here to Skip to main content
16,006,006 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataGrid Custom Column Header Pin
Heath Stewart30-Sep-04 14:30
protectorHeath Stewart30-Sep-04 14:30 
GeneralRe: DataGrid Custom Column Header Pin
ddelapasse30-Sep-04 14:56
ddelapasse30-Sep-04 14:56 
GeneralRe: DataGrid Custom Column Header Pin
Heath Stewart1-Oct-04 14:36
protectorHeath Stewart1-Oct-04 14:36 
GeneralShortcut Manager Pin
pat27088130-Sep-04 10:11
pat27088130-Sep-04 10:11 
GeneralRe: Shortcut Manager Pin
Heath Stewart30-Sep-04 10:32
protectorHeath Stewart30-Sep-04 10:32 
GeneralRe: ProgressBar Pin
Heath Stewart30-Sep-04 10:28
protectorHeath Stewart30-Sep-04 10:28 
GeneralPerformance of DoubleBuffer in .NET Pin
Wizard_0130-Sep-04 9:41
Wizard_0130-Sep-04 9:41 
GeneralRe: Performance of DoubleBuffer in .NET Pin
Heath Stewart30-Sep-04 10:26
protectorHeath Stewart30-Sep-04 10:26 
And this is exactly what needs to be done. The secondary bitmap needs to be created each time (or at least cleared, but there's not really any performance benefit to that for simple compat bitmaps). Just because a class is being instantiated in .NET doesn't mean it's a heavy object. Many times it simply encapsulates an HDC or something and contains few to no fields (fields are what consume memory - not methods). The methods are just gravy, so to speak. They act on the fields (or other data passed to them), so if they are wrapping an HDC for a compat bitmap in order to run methods on it (encapsulation), then it's make it easier to use within code. Why duplicate all that code when you can have an encapsulating class handle it. That's what encapsulation's all about.

If you haven't implemented double buffering natively, I suggest you give it a try. This may shed some light on what's going on exactly.

Note that in some platforms and frameworks like DirectX, flipping buffers often yields better performance but both buffers (can be more than two, too) are typically "heavier" objects with transformations tied to them (it greatly depends on how you develop such code), so clearing them after flipping (or before) is better.

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

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles]
GeneralRe: Performance of DoubleBuffer in .NET Pin
Wizard_0130-Sep-04 11:10
Wizard_0130-Sep-04 11:10 
GeneralRandom number in C# Pin
goatstudio30-Sep-04 8:01
goatstudio30-Sep-04 8:01 
GeneralRe: Random number in C# Pin
Dave Kreskowiak30-Sep-04 8:22
mveDave Kreskowiak30-Sep-04 8:22 
GeneralRe: Random number in C# Pin
Nick Parker30-Sep-04 8:37
protectorNick Parker30-Sep-04 8:37 
GeneralNavigation in the same window for WebBrowser Control Pin
kayhustle30-Sep-04 6:52
kayhustle30-Sep-04 6:52 
GeneralRe: Navigation in the same window for WebBrowser Control Pin
Nick Parker30-Sep-04 8:10
protectorNick Parker30-Sep-04 8:10 
GeneralQuestion about .NET visual inheritance and MDI apps. Pin
rolst530-Sep-04 6:41
rolst530-Sep-04 6:41 
GeneralRe: Question about .NET visual inheritance and MDI apps. Pin
Heath Stewart30-Sep-04 6:55
protectorHeath Stewart30-Sep-04 6:55 
GeneralExcel Automation question Pin
sameerhanda30-Sep-04 6:33
sameerhanda30-Sep-04 6:33 
GeneralRe: Excel Automation question Pin
Heath Stewart30-Sep-04 6:46
protectorHeath Stewart30-Sep-04 6:46 
GeneralRe: Excel Automation question Pin
sameerhanda30-Sep-04 7:17
sameerhanda30-Sep-04 7:17 
GeneralRe: Excel Automation question Pin
Heath Stewart30-Sep-04 7:54
protectorHeath Stewart30-Sep-04 7:54 
GeneralRe: Excel Automation question Pin
sameerhanda30-Sep-04 8:12
sameerhanda30-Sep-04 8:12 
GeneralRe: Excel Automation question Pin
Heath Stewart30-Sep-04 10:13
protectorHeath Stewart30-Sep-04 10:13 
GeneralRe: Excel Automation question Pin
sameerhanda30-Sep-04 11:08
sameerhanda30-Sep-04 11:08 
Generalpictures in textboxes Pin
vyki_c30-Sep-04 6:22
vyki_c30-Sep-04 6:22 
GeneralRe: pictures in textboxes Pin
Heath Stewart30-Sep-04 6:40
protectorHeath Stewart30-Sep-04 6:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.