我们都知道Delphi的很多控件有滚动条,可现在很流行浮动式滚动条。Delphi的控件并不具备这样的外观。现在流行FloatStyle套件。可是当我不具备该套又想拥有浮动式滚动条的控件该怎么办呢?
用commctrl单元中的InitializeFlatSB函数
下面看个例子很好玩的
unit Unit1;
interface
uses
Windows, Messages, commctrl, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
InitializeFlatSB(Memo1.Handle);
end;
end.
想取消就调用UninitializeFlatSB好了。
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!



