[delphi]老代码维护 - 窗体的FormCanResize事件与FormResize 有何区别
偶尔发现有份老代码用的 FormCanResize 事件,而非常用的 FormResize ,特记录一下两者的区别
来自 http://www.yourdelphi.com/topic_192296_2a17.htm
--------------------------------------------------
窗体的FormCanResize事件与FormResize???
发表回复
9 篇帖子 • 分页:1 / 1
窗体的FormCanResize事件与FormResize???
帖子 由 lzchinaboy1 » 星期五, 2003年6月20日 17:11
这两者之间有什么区别??
者是resize
页首
窗体的FormCanResize事件与FormResize???
帖子 由 JamesBond_L » 星期五, 2003年6月20日 17:13
FormCanResize是在resize前發生﹐來控制是否可以resize。
FormResize是在resize后發生。
页首
窗体的FormCanResize事件与FormResize???
帖子 由 lzchinaboy1 » 星期五, 2003年6月20日 17:15
FormCanResize是在resize前發生﹐來控制是否可以resize。
这句还有点不明白??
你的意思是说可以让onresize不发生??
再说明白点马上给分
页首
窗体的FormCanResize事件与FormResize???
帖子 由 CosmopolitanKen » 星期五, 2003年6月20日 18:26
OnCanResize event
Occurs when an attempt is made to resize the control.
Description
Use OnCanResize to adjust the way a control is resized. If necessary, change the new width and height of the control in the OnCanResize event handler. The OnCanResize event handler also allows applications to indicate that the entire resize should be Abort ed.
If there is no OnCanResize event handler, or if the OnCanResize event handler indicates that the resize attempt can proceed, the OnCanResize event is followed immediately by an OnConstrainedResize event.
OnResize event
Occurs immediately after the control is resized.
Use OnResize to make any final adjustments after a control is resized.
To modify the way a control responds when an attempt is made to resize it, use OnCanResize or OnConstrainedResize.
Note: Some controls call this event handler when the control is first created.
页首
窗体的FormCanResize事件与FormResize???
帖子 由 CosmopolitanKen » 星期五, 2003年6月20日 18:27
FormCanResize是在resize前發生﹐
你看看帮助就知道了
页首
窗体的FormCanResize事件与FormResize???
帖子 由 JamesBond_L » 星期五, 2003年6月20日 21:50
to lzchinaboy1:
的确是用于控制onresize发生否。
页首
窗体的FormCanResize事件与FormResize???
帖子 由 lzchinaboy1 » 星期六, 2003年6月21日 10:35
那到底是用onresize好,还是用FormCanResize???
页首
窗体的FormCanResize事件与FormResize???
帖子 由 JamesBond_L » 星期六, 2003年6月21日 10:47
當然一般用onresize。
页首
窗体的FormCanResize事件与FormResize???
帖子 由 lzchinaboy1 » 星期六, 2003年6月21日 11:22
好的。 给分