Delphi中TRzPageControl实现多窗口的融合窗口

 典型的融合窗口,比如Maxthon浏览器,浏览多个网页非常方便;微软眼见融合窗口众望所归,在IE7版本也引入了融合窗口技术,但微软的IE既耗内存又容易崩溃。题外话不多说了。在delphi实现其实也很简单:

procedure ShowDockForm(FormClass: TFormClass; dockCtrl: TWinControl;  
IsMaxed: Boolean);  
procedure ShowCaption(ParentCtrl:TWinControl;ACaption:string);  
begin  
    if ParentCtrl is TRzTabSheet then  
     TRzTabSheet(ParentCtrl).Caption := ACaption;  
end;  
var  
i: Integer;  
TabCtrl:TRzTabSheet;  
Form:TForm;  
begin  
Screen.Cursor := crHourGlass;  
try  
    for i := 0 to Screen.CustomFormCount - 1 do  
      if Screen.CustomForms[i] is FormClass then  
      begin  
        if (not (Screen.CustomForms[i]).Visible) then  
          (Screen.CustomForms[i]).Visible := True;  
        (Screen.CustomForms[i]).BringToFront;  
        (Screen.CustomForms[i]).SetFocus;  
        TabCtrl := TRzTabSheet(Screen.CustomForms[i].Parent);  
        ShowCaption(TabCtrl,Screen.CustomForms[i].Caption);  
        TRzPageControl(dockCtrl).ActivePageIndex := TabCtrl.PageIndex;  
          exit;  
      end;  
    TabCtrl := TRzTabSheet.Create(dockCtrl);   //dockCtrl  
    TabCtrl.PageControl := TRzPageControl(dockCtrl);  
    TRzPageControl(dockCtrl).ActivePageIndex := TabCtrl.PageIndex;  
    Form := FormClass.Create(TabCtrl);  
    with Form do  
    try  
      ManualDock(TabCtrl);  
      ShowCaption(TabCtrl,Caption);  
      Show;  
      Form.WindowState := wsMaximized;  
      Form.Align := alClient;  
    except  
      Free;  
    end;  
     
finally  
    Screen.Cursor := crDefault;  
end;  
end; 

以上代码是在 Raize 5.X中的TRzPageControl 实现多窗口的融合窗口。

Raize Components 6.1.12 Modifications The following is a list of all of the modifications that have been made for version 6.1.12 of Raize Components. For a list of all modifications made to previous versions of Raize Components 6, please see the "RC 6 Modifications.txt" file. -------------------------------------------------------------------------------- Build: 6.1.12 Date: 11 Apr 2015 -------------------------------------------------------------------------------- Added support for Embarcadero RAD Studio XE8. Supported IDEs Embarcadero RAD Studio XE8 -- Delphi XE8 & C++Builder XE8 Embarcadero RAD Studio XE7 -- Delphi XE7 & C++Builder XE7 Embarcadero RAD Studio XE6 -- Delphi XE6 & C++Builder XE6 Embarcadero RAD Studio XE5 -- Delphi XE5 & C++Builder XE5 Embarcadero RAD Studio XE4 -- Delphi XE4 & C++Builder XE4 Embarcadero RAD Studio XE3 -- Delphi XE3 & C++Builder XE3 Embarcadero RAD Studio XE2 -- Delphi XE2 & C++Builder XE2 Embarcadero RAD Studio XE -- Delphi XE & C++Builder XE Embarcadero RAD Studio 2010 -- Delphi 2010 & C++Builder 2010 CodeGear RAD Studio 2009 -- Delphi 2009 & C++Builder 2009 RzButton.pas * Fixed issue in TRzToolButton where drop down menu would be displayed on the adjacent monitor under certainly situations. RzDBEdit.pas * Fixed issue in TRzDBEdit and descendants where registered style hook was not correctly unregistered when the hook was no longer needed. * Added UseFormatToParse property to TRzDateTimeEdit. Set this property to True in situations where the Time to be parsed contains more elements than are contained in the LongTimeFormat string. For example, if the Time needed to be entered must have 'hh:nn:ss.zzz' and the LongTimeFormat string is set to 'hh:nn', then set the UseFormatToParse to True and set the Format property to the desired format string. RzDBList.pas * Surface the Sorted property in TRzDBListBox. RzEdit.pas * Fixed issue in TRzEdit and descendants where registered style hook was not correctly unregistered when the hook was no longer needed. * Added UseFormatToParse property to TRzDateTimeEdit. Set this property to True in situations where the Time to be parsed contains more elements than are contained in the LongTimeFormat string. For example, if the Time needed to be entered must have 'hh:nn:ss.zzz' and the LongTimeFormat string is set to 'hh:nn', then set the UseFormatToParse to True and set the Format property to the desired format string. RzGroupBar.pas * Fixed issue in TRzGroupBar where registered style hook was not correctly unregistered when the hook was no longer needed. RzLstBox.pas * Fixed issue in TRzListBox and descendants where text in item hints would get clipped if the TRzBalloonHints component was also being used in the application. RzShellCtrls.pas * When dragging a file from a TRzShellList and dropping it onto a different folder in the associated TRzShellTree, the shell tree no longer scrolls to the source folder represented by the shell list. That is, the shell tree maintains its current view. RzSpnEdt.pas * Fixed issue where ParentColor property in TRzSpinner and TRzDBSpinner was not getting streamed correctly to form files. RzTabs.pas * Fixed issue where drop-down menu in TRzPageControl and TRzTabControl would not be displayed correctly when using a custom VCL Style in XE6 or XE7. * Added LightenUnselectedColoredTabs property to TRzPageControl and TRzTabControl. When this property is True, a non-active colored tab will be displayed with a lightened version of the tab color. When this property is False, the unselected tab is displayed in the same color as the active tab color. --------------------------------------------------------------------------------
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值