Click here to Skip to main content
15,896,269 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionRepainting Display Seems Slow Pin
BuckBrown6-Aug-07 11:03
BuckBrown6-Aug-07 11:03 
AnswerRe: Repainting Display Seems Slow Pin
Luc Pattyn6-Aug-07 11:10
sitebuilderLuc Pattyn6-Aug-07 11:10 
GeneralRe: Repainting Display Seems Slow Pin
BuckBrown6-Aug-07 11:52
BuckBrown6-Aug-07 11:52 
GeneralRe: Repainting Display Seems Slow Pin
Luc Pattyn6-Aug-07 12:14
sitebuilderLuc Pattyn6-Aug-07 12:14 
GeneralRe: Repainting Display Seems Slow Pin
BuckBrown7-Aug-07 6:24
BuckBrown7-Aug-07 6:24 
GeneralRe: Repainting Display Seems Slow Pin
Luc Pattyn7-Aug-07 6:51
sitebuilderLuc Pattyn7-Aug-07 6:51 
GeneralRe: Repainting Display Seems Slow Pin
BuckBrown7-Aug-07 7:55
BuckBrown7-Aug-07 7:55 
GeneralRe: Repainting Display Seems Slow Pin
Luc Pattyn7-Aug-07 13:36
sitebuilderLuc Pattyn7-Aug-07 13:36 
Hi Buck,

if (part of) your drawing is not available, your OnPaint should not even attempt to draw it;
the normal approach is having some test: if wafer were an object, it would initially be
null, so do a null test in OnPaint to skip it when wafer is not yet, or no longer, valid.
Basically what I am saying is: OnPaint should draw everything that is present in
your virtual drawing, that could be an arbitrary collection of items, it's completely up
to you.


BuckBrown wrote:
if the screen is physically repainted with each Graphics->DrawString() command


it is not, this line belongs inside OnPaint, and it does not cause a new execution of
OnPaint.


If for some reason you would be repainting the same (or slightly changed) wafer, and
want the disturbance/flicker/whatever to be minimal, you may choose to make the
control you are drawing on (Panel, Form, whatever) be doublebuffered; there is a property
for that, it entails a hidden bitmap that gets drawn upon, then blitted onto the screen.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]


this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google


Questionhow to convert a String to datetime and do subtraction of time ??? Pin
aefmaaradji6-Aug-07 1:01
aefmaaradji6-Aug-07 1:01 
AnswerRe: how to convert a String to datetime and do subtraction of time ??? Pin
Luc Pattyn6-Aug-07 1:12
sitebuilderLuc Pattyn6-Aug-07 1:12 
Questiondouble(*)[2] ? Pin
dalgados5-Aug-07 21:18
dalgados5-Aug-07 21:18 
AnswerRe: double(*)[2] ? Pin
prasad_som5-Aug-07 22:22
prasad_som5-Aug-07 22:22 
Questionhow to declare a matrix in visual c++.net 2005 c++ cli ? Pin
aefmaaradji5-Aug-07 0:28
aefmaaradji5-Aug-07 0:28 
AnswerRe: how to declare a matrix in visual c++.net 2005 c++ cli ? Pin
mid=57415-Aug-07 5:17
mid=57415-Aug-07 5:17 
GeneralRe: how to declare a matrix in visual c++.net 2005 c++ cli ? Pin
aefmaaradji5-Aug-07 12:09
aefmaaradji5-Aug-07 12:09 
GeneralRe: how to declare a matrix in visual c++.net 2005 c++ cli ? Pin
mid=57415-Aug-07 12:16
mid=57415-Aug-07 12:16 
GeneralRe: how to declare a matrix in visual c++.net 2005 c++ cli ? Pin
George L. Jackson5-Aug-07 13:24
George L. Jackson5-Aug-07 13:24 
GeneralRe: how to declare a matrix in visual c++.net 2005 c++ cli ? Pin
aefmaaradji6-Aug-07 0:52
aefmaaradji6-Aug-07 0:52 
QuestionHow to wrap native array? Pin
mid=57414-Aug-07 9:06
mid=57414-Aug-07 9:06 
AnswerRe: How to wrap native array? Pin
Luc Pattyn4-Aug-07 9:24
sitebuilderLuc Pattyn4-Aug-07 9:24 
GeneralRe: How to wrap native array? Pin
mid=57414-Aug-07 9:30
mid=57414-Aug-07 9:30 
GeneralRe: How to wrap native array? Pin
Luc Pattyn4-Aug-07 10:03
sitebuilderLuc Pattyn4-Aug-07 10:03 
GeneralRe: How to wrap native array? Pin
mid=57414-Aug-07 10:38
mid=57414-Aug-07 10:38 
Questiontray icon query Pin
dona jain3-Aug-07 19:50
dona jain3-Aug-07 19:50 
AnswerRe: tray icon query Pin
Christian Graus3-Aug-07 21:22
protectorChristian Graus3-Aug-07 21:22 

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.