美文网首页
2018-10-13 窗体透明控制

2018-10-13 窗体透明控制

作者: netppp | 来源:发表于2018-10-13 16:18 被阅读0次

    unit Unit1;

    interface

    uses

      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

      Dialogs, StdCtrls;

    type

      TForm1 = class(TForm)

        Button1: TButton;

        ScrollBar1: TScrollBar;

        procedure Button1Click(Sender: TObject);

        procedure FormCreate(Sender: TObject);

        procedure ScrollBar1Change(Sender: TObject);

      private

        { Private declarations }

      public

        { Public declarations }

      end;

    var

      Form1: TForm1;

    implementation

    {$R *.dfm}

    procedure TForm1.Button1Click(Sender: TObject);

    begin

              form1.AlphaBlend:=true;

              ScrollBar1.enabled:=true;

    end;

    procedure TForm1.FormCreate(Sender: TObject);

    begin

            scrollbar1.Min:=0;

            scrollbar1.Max:=255;

            scrollbar1.position:=255;

            scrollbar1.Enabled:=False;

            form1.AlphaBlend:=False;

    end;

    procedure TForm1.ScrollBar1Change(Sender: TObject);

    begin

        Form1.AlphaBlendvalue:=ScrollBar1.Position;  //AlphaBlendvalue

    end;

    end.

    相关文章

      网友评论

          本文标题:2018-10-13 窗体透明控制

          本文链接:https://www.haomeiwen.com/subject/duioaftx.html