登录 用户中心() [退出] 后台管理 注册
   
您的位置: 首页 >> SoftHub关联区 >> 主题: [delphi]老代码维护 - 窗体的FormCanResize事件与FormResize 有何区别    [最新]     [回主站]
[delphi]老代码维护 - 窗体的FormCanResize事件与FormResize 有何区别
clq
浏览(264) - 2019-08-15 13:38:21 发表 编辑

关键字: delphi

[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

好的。 给分



总数:0 页次:1/0 首页 尾页  
总数:0 页次:1/0 首页 尾页  


所在合集/目录
delphi老代码维护 更多



发表评论:
文本/html模式切换 插入图片 文本/html模式切换


附件:



NEWBT官方QQ群1: 276678893
可求档连环画,漫画;询问文本处理大师等软件使用技巧;求档softhub软件下载及使用技巧.
但不可"开车",严禁国家敏感话题,不可求档涉及版权的文档软件.
验证问题说明申请入群原因即可.

Copyright © 2005-2020 clq, All Rights Reserved
版权所有
桂ICP备15002303号-1