以下的程序相信大家都看的明白!
但是出错,找不出原因,希望大家帮帮忙?以下代码:unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
procedure MyShowHint(var HintStr:string ; var CanShow:Boolean ;
var Hintinfo:THintinfo) ;
end;var
Form1: TForm1;implementation{$R *.dfm}procedure MyShowHint(var HintStr:string ; var CanShow:Boolean ; //这里出错!
var Hintinfo:THintinfo) ;
var
i : integer ;
begin
for i:=0 to Application.ComponentCount-1 do
if Application.Components[i] is THintWindow then
with THintWindow(Application.Components[i]).Canvas do
begin
Font.Name := '隶书' ;
Font.Size := 18 ;
Font.Style := [fsBold] ;
HintInfo.HintColor := clYellow ;
end ;
end ; procedure TForm1.FormCreate(Sender: TObject);
begin
form1.Hint := '改变提示栏' + #13 + '字体及颜色' ;
Application.OnShowHint := MyShowHint ;
end;end.大家帮帮看看呀?谢谢大家了!
但是出错,找不出原因,希望大家帮帮忙?以下代码:unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
procedure MyShowHint(var HintStr:string ; var CanShow:Boolean ;
var Hintinfo:THintinfo) ;
end;var
Form1: TForm1;implementation{$R *.dfm}procedure MyShowHint(var HintStr:string ; var CanShow:Boolean ; //这里出错!
var Hintinfo:THintinfo) ;
var
i : integer ;
begin
for i:=0 to Application.ComponentCount-1 do
if Application.Components[i] is THintWindow then
with THintWindow(Application.Components[i]).Canvas do
begin
Font.Name := '隶书' ;
Font.Size := 18 ;
Font.Style := [fsBold] ;
HintInfo.HintColor := clYellow ;
end ;
end ; procedure TForm1.FormCreate(Sender: TObject);
begin
form1.Hint := '改变提示栏' + #13 + '字体及颜色' ;
Application.OnShowHint := MyShowHint ;
end;end.大家帮帮看看呀?谢谢大家了!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货