CnPack Forum


 
Subject: Delphi IDE 得到当前窗口
ouyang_hz
新警察
Rank: 1



UID 42936
Digest Posts 0
Credits 8
Posts 3
点点分 8
Reading Access 10
Registered 2009-7-30
Status Offline
Post at 2009-7-30 14:44  Profile | Blog | P.M. 
Delphi IDE 得到当前窗口

如果IDE中建立了多个窗体在编辑,我们可以看到,只是在当前编辑的窗口上才会显示“位置排列”、“自动更新位置”等工具面板,想请教一下,怎么样才能在IDE中得到当前编辑的窗体?
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6750
Posts 3551
点点分 6750
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2009-8-3 12:56  Profile | Blog | P.M. 
先从BorlandIDEServices的CurrentModule获得当前Module,再从Module获得FormEditor编辑器,再从编辑器的Root属性获得设计期窗口。

具体可参考CnPack源码中CnWizUtils.pas中的CnOtaGetCurrDesignedForm函数。
Top
ouyang_hz
新警察
Rank: 1



UID 42936
Digest Posts 0
Credits 8
Posts 3
点点分 8
Reading Access 10
Registered 2009-7-30
Status Offline
Post at 2009-8-3 15:10  Profile | Blog | P.M. 
谢谢啸哥,我试试。有问题还请指教
Top
 




All times are GMT++8, the time now is 2024-3-29 04:18

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.007986 second(s), 8 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP