⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mdibkgnddemomain.pas

📁 最新版 JCL+JVCL控件!非常不错的控件资源。包含了所能用到的大部分功能!
💻 PAS
字号:
unit MDIBkgndDemoMain;

interface

uses
  Windows, Messages, SysUtils, Classes, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls, Buttons, Menus, Graphics, JvBackgrounds, MDIBkgndDemoFrame;

type
  TMDIMainForm = class(TForm)
    MainMenu1: TMainMenu;
    Image1: TMenuItem;
    ImageLoad: TMenuItem;
    OpenDialog: TOpenDialog;
    Background: TJvBackground;
    DemoFrame1: TDemoFrame;
    procedure ImageLoadClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  MDIMainForm: TMDIMainForm;

implementation

uses MDIBkgndDemoSettings;

{$R *.DFM}

procedure TMDIMainForm.ImageLoadClick(Sender: TObject);
begin
  with OpenDialog do
  begin
    if Background.Image.Picture.Graphic <> nil
      then DefaultExt := GraphicExtension(TGraphicClass(Background.Image.Picture.Graphic.ClassType))
      else DefaultExt := GraphicExtension(TBitmap);
    if Execute then
    with Background.Image.Picture do
    begin
      LoadFromFile(FileName);
      BkgndImageSettings.TileWidth.MinValue := Width;
      BkgndImageSettings.TileHeight.MinValue := Height;
      BkgndImageSettings.TileWidth.Value := Width;
      BkgndImageSettings.TileHeight.Value := Height;
    end;
  end;
end;

procedure TMDIMainForm.FormCreate(Sender: TObject);
begin
  OpenDialog.Filter := GraphicFilter(TGraphic);
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -