四月 2008

vcl线程内Synchronize更新主线程ui的问题

问题是这样的:我的Form会触发一个相当耗时的work,而同时我又不希望这个Form在做这个work的时候UI停止响应,所以,我把这个work放到了线程里执行(起了个继承自TThread的TWorker类),现在的问题时我想让这个工作的当前完成度在Form上以进度条的形式反馈给用户,也就是在线程中更新vcl组件的问题,

继续阅读…

[ExpressBars]How to Force a Main Menu to Always Be on Top of a Form

This can be accomplished if the main menu is placed onto a dock control, whose AllowDocking is set to False. Here are the step-by-step instructions of how to implement this feature in your application:
1. Drop the TdxBarDockControl component onto a form. The dock control is aligned to the top by default. Set the BarManager property to the BarManager of the form;
2. Dock the main menu to the dock control;
3. Set the AllowDocking to False of the dock control;
4. Set the NotDocking property of the main menu to [dsNone, dsLeft, dsTop, dsRight, dsBottom] (i.e. activate all options of the NotDocking).
The attached samples demonstrate the results of these steps.