Click here to Skip to main content
15,901,505 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: virtual methods on existing value types Pin
James T. Johnson1-May-03 17:57
James T. Johnson1-May-03 17:57 
Generalpaint application question Pin
lfsong30-Apr-03 0:41
lfsong30-Apr-03 0:41 
GeneralRe: paint application question Pin
J. Dunlap30-Apr-03 8:31
J. Dunlap30-Apr-03 8:31 
GeneralRe: paint application question Pin
lfsong1-May-03 17:55
lfsong1-May-03 17:55 
GeneralRe: paint application question Pin
James T. Johnson1-May-03 18:06
James T. Johnson1-May-03 18:06 
GeneralRe: paint application question Pin
lfsong2-May-03 5:30
lfsong2-May-03 5:30 
GeneralRe: paint application question Pin
James T. Johnson2-May-03 14:57
James T. Johnson2-May-03 14:57 
GeneralRe: paint application question Pin
lfsong2-May-03 19:03
lfsong2-May-03 19:03 
base.OnPaintBackground

It's true this code will cause flicker.
What I have done up to now:
UI - draw background segaments on client according to the clientsize. I want to put a sizegrip on southeast corner of the client, whenever user changes the cilent size. The code in OnPaint() redraw the background segaments' bitmap to the new location and with new length(I use the trick to draw four 1 height/width bitmaps repeatly on border areas). Because there are more calculating in redrawing procedure, it seems even OnPaintBackGround() could not stop flicker. So I use SetStyle(), I haven't finish the sizeGrip control so I don't know if changing clientSize continuously(along with continuously calculating in redraw procedure) would cause flicker even I set Control.DoubleBuffer to true?
Why I am paint the client with bitmaps but not generate single background bitmap is the memory using issue.
If using single bitmap buffer offscreen to redraw the whole client, at my desktop resolution of 1400x1050, my applicaiton(20k) under a fullscreen mode will take up 30mb memory in allEek! | :eek:

Layer draw - draw on two bitamp buffers and when invalidated the client redraw them on client by order, when use OnPaintBackGround() to redraw even a continuously drawing of strokes( along with a continuously invalidating )will not show even a slightly flicker. And draw on buffer allow another tool in my application to be easily made: the zoom tool, that is the brushe tool only know the canvas size and draw on only one rectangle area, the View(a contorl) would calculate the coordinate transformation for the brush tool.Smile | :)

I still want to know deeper inside all these things, I tried as this: under the current version of my application(about 28k), it start up with a memory use of around 14mb(is .NET application upon CLR alway takes that much memory???), when enlarge to full screen(1400x1050), the memory use rises to about 15mb much. So what I want to know is what had the .NET framework did for me after I set Control.DoubleBuffer to true? How is the
underlying BitBlt 
you've mentioned worked underlying? It seems there is not a whole bitmap underlying been generated for buffering.

3x for your replys by the way;)
GeneralRe: paint application question Pin
James T. Johnson2-May-03 23:00
James T. Johnson2-May-03 23:00 
GeneralRe: paint application question Pin
lfsong4-May-03 18:46
lfsong4-May-03 18:46 
GeneralRe: paint application question Pin
J. Dunlap4-May-03 18:57
J. Dunlap4-May-03 18:57 
GeneralRe: paint application question Pin
lfsong4-May-03 22:52
lfsong4-May-03 22:52 
GeneralRe: paint application question Pin
James T. Johnson4-May-03 19:05
James T. Johnson4-May-03 19:05 
GeneralRe: paint application question Pin
J. Dunlap4-May-03 19:36
J. Dunlap4-May-03 19:36 
GeneralRe: paint application question Pin
James T. Johnson4-May-03 20:24
James T. Johnson4-May-03 20:24 
GeneralRe: paint application question Pin
J. Dunlap4-May-03 20:29
J. Dunlap4-May-03 20:29 
GeneralRe: paint application question Pin
lfsong4-May-03 23:36
lfsong4-May-03 23:36 
GeneralRe: paint application question Pin
James T. Johnson5-May-03 1:01
James T. Johnson5-May-03 1:01 
QuestionAm I running as a native image? Pin
solidstore29-Apr-03 1:20
solidstore29-Apr-03 1:20 
AnswerRe: Am I running as a native image? Pin
Stephane Rodriguez.29-Apr-03 2:18
Stephane Rodriguez.29-Apr-03 2:18 
GeneralLow level network application Pin
Andrei Matei28-Apr-03 22:29
Andrei Matei28-Apr-03 22:29 
GeneralRe: Low level network application Pin
Andy Davey29-Apr-03 16:16
Andy Davey29-Apr-03 16:16 
Generalcall to the main thread Pin
OmegaSupreme28-Apr-03 15:59
OmegaSupreme28-Apr-03 15:59 
GeneralRe: call to the main thread Pin
Andy Davey28-Apr-03 16:24
Andy Davey28-Apr-03 16:24 
GeneralRe: call to the main thread Pin
OmegaSupreme28-Apr-03 16:54
OmegaSupreme28-Apr-03 16:54 

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.