开发者

How much time takes a form to resize?

In order to compare performance of custom drawing I need to calculate the time a form takes to resize (or maximize - pass from its normal to maximized state).

Where should I start / stop the StopWatch?

Tried OnResize/OnSizeChanged and also OnResizeBegin/开发者_高级运维OnResizeEnd but both depends of how quick I drag the mouse...


In the form's Resize and SizeChanged events. SizeChanged is first, start there, then Resize.

You might need to use the Layout event. Check event's documentation for event order.

Also, you may find EventSpy helpful. There is an option for a timestamp and you can "spy" on certain events of specific controls. (EventSpy at ftp://missico.net/EventSpy.zip.)


Temporary solution is to use (on the parent Form) New(constructor) ==> OnShown. This is, surely, not just the resizing time but at least does not depend of the user speed of drag...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜