来自Borland TeamC的办法: 将forms.pas从BCB安装目录拷贝到你的BCB工程目录下,然后将这里提供的改动部分粘贴到源文件中去,同名函数要注释掉旧的;
选择菜单Project->Options->Packages,关闭Build with runtime packages 选项(即不选中);
选择菜单Project->Add to projects...,将拷贝的文件加入进工程;
选择菜单Project->Build 你的工程即可(请先保存工程,因为有时Build后会兰屏,重运行BCB即可)。 注:
请注意版本说明,将此版本中改动的地方粘贴到你所用的版本的源代码中去调试(我不保证不同版本源代码可以互用);
此方法适用于任何你想改动源代码并且应用到现有的BCB中去的情况,比如汉化对话框文本(修改consts.pas);
我在源代码中做了改动的地方,注明了改动代码者的名字,多谢这些朋友们,无论国籍和地域。 如果你从这里获得启发,并且有其它对BCB源代码有价值的改动,能让我分享吗?
谢谢啦!
-------------------------
odin
[email protected]
China,Nan Jing
2000/11/11
-------------------------
{-----------------------------------------------------------------
Paste followd code into your old forms.pas file to fix the bug:
When maximizes several child windows in MDI,and closes the top one,then the window menus of next child don't disappear or become grey.
By Gene Fowler - [email protected]
-----------------------------------------------------------------}
procedure TCustomForm.MergeMenu(MergeState: Boolean);
var
AMergeMenu: TMainMenu;
Size: Longint;
FixMaximize: boolean;
begin
if not (fsModal in FFormState) and
(Application.MainForm <> nil) and
(Application.MainForm.Menu <> nil) and
(Application.MainForm <> Self) and
((FormStyle = fsMDIChild) or (Application.MainForm.FormStyle <>
fsMDIForm)) then
begin
AMergeMenu := nil;
if not (csDesigning in ComponentState) and (Menu <> nil) and
(Menu.AutoMerge or (FormStyle = fsMDIChild)) then AMergeMenu := Menu;
FixMaximize := MergeState and (FormStyle = fsMDIChild) and
(WindowState = wsMaximized);
// The important change from the healthy MergeMenu from D4
// is that the Restore/RE-maximize are split up to match the
// behavior described in the Win32 Help's wm_MDINext topic (at
// the bottom).
if FixMaximize then begin
{ Force MDI to put back the system menu of a maximized child }
Size := ClientWidth + (Longint(ClientHeight) shl 16);
SendMessage(Handle, WM_SIZE, SIZE_RESTORED, Size);
end;
try
with Application.MainForm.Menu do
if MergeState then Merge(AMergeMenu) else Unmerge(AMergeMenu);
finally
if FixMaximize then
begin
Size := ClientWidth + (Longint(ClientHeight) shl 16);
SendMessage(Handle, WM_SIZE, SIZE_MAXIMIZED, Size);
end;
end;
end;
end;
选择菜单Project->Options->Packages,关闭Build with runtime packages 选项(即不选中);
选择菜单Project->Add to projects...,将拷贝的文件加入进工程;
选择菜单Project->Build 你的工程即可(请先保存工程,因为有时Build后会兰屏,重运行BCB即可)。 注:
请注意版本说明,将此版本中改动的地方粘贴到你所用的版本的源代码中去调试(我不保证不同版本源代码可以互用);
此方法适用于任何你想改动源代码并且应用到现有的BCB中去的情况,比如汉化对话框文本(修改consts.pas);
我在源代码中做了改动的地方,注明了改动代码者的名字,多谢这些朋友们,无论国籍和地域。 如果你从这里获得启发,并且有其它对BCB源代码有价值的改动,能让我分享吗?
谢谢啦!
-------------------------
odin
[email protected]
China,Nan Jing
2000/11/11
-------------------------
{-----------------------------------------------------------------
Paste followd code into your old forms.pas file to fix the bug:
When maximizes several child windows in MDI,and closes the top one,then the window menus of next child don't disappear or become grey.
By Gene Fowler - [email protected]
-----------------------------------------------------------------}
procedure TCustomForm.MergeMenu(MergeState: Boolean);
var
AMergeMenu: TMainMenu;
Size: Longint;
FixMaximize: boolean;
begin
if not (fsModal in FFormState) and
(Application.MainForm <> nil) and
(Application.MainForm.Menu <> nil) and
(Application.MainForm <> Self) and
((FormStyle = fsMDIChild) or (Application.MainForm.FormStyle <>
fsMDIForm)) then
begin
AMergeMenu := nil;
if not (csDesigning in ComponentState) and (Menu <> nil) and
(Menu.AutoMerge or (FormStyle = fsMDIChild)) then AMergeMenu := Menu;
FixMaximize := MergeState and (FormStyle = fsMDIChild) and
(WindowState = wsMaximized);
// The important change from the healthy MergeMenu from D4
// is that the Restore/RE-maximize are split up to match the
// behavior described in the Win32 Help's wm_MDINext topic (at
// the bottom).
if FixMaximize then begin
{ Force MDI to put back the system menu of a maximized child }
Size := ClientWidth + (Longint(ClientHeight) shl 16);
SendMessage(Handle, WM_SIZE, SIZE_RESTORED, Size);
end;
try
with Application.MainForm.Menu do
if MergeState then Merge(AMergeMenu) else Unmerge(AMergeMenu);
finally
if FixMaximize then
begin
Size := ClientWidth + (Longint(ClientHeight) shl 16);
SendMessage(Handle, WM_SIZE, SIZE_MAXIMIZED, Size);
end;
end;
end;
end;
解决方案 »
- WM运行一段时间之后 图片不能加载
- 模拟按键的问题
- 两个语言问题,本人刚刚学急
- 关于数据库的溢出问题,高手请指教。
- 大虾们帮帮忙呀!!!!!!!!!!!!!!!!!!
- 问:本人写了个简单的MIDASWeb的ISAPI程序(dll),可不知道怎么在IE中显示它?
- 怎么禁止dbgrideh自动post阿???(在线给分)(急阿)
- 请问如何用SQL语句取得Oracle数据库服务器的 时间?
- 关于通过网络用ADO连接ACCESS数据库的一些小问题,很简单的哦!
- Delphi中如何将xml文件转换为二进制流用于md5计算,计算结果为16字节2进制数据
- 上网才发现,好的一个编程站点难求,或是我的求法不对,请给我推荐几个好的站点。只要是好站,一定给分!
- 请问怎么改变TREEVIEW中图片的大小?
to WEIJIA: 这分你一定要给了