C
coolcat
Unregistered / Unconfirmed
GUEST, unregistred user!
var
MenuItem:TMenuItem;
S:String;
begin
MenuItem:=Sender as TMenuItem;
Height:=22;
Width:=ACanvas.TextWidth(MenuItem.Caption)+25;
if MenuItem.Caption='-' then s:='';
if ShortCutToText(MenuItem.ShortCut)<>'' then
begin
Width:=Width+ACanvas.TextWidth(ShortCutToText(MenuItem.ShortCut));
s:=MenuItem.Caption;
s:=s+' '+ShortCutToText(MenuItem.ShortCut);
(Sender as TMenuItem).Caption:=s;
end;
end;
在Windows 2000下一运行就蓝屏..我试了3次蓝了三次.,
就是(Sender as TMenuItem).Caption:=s;这句的问题,去掉就不蓝了.
各位看看..怎么回事...
MenuItem:TMenuItem;
S:String;
begin
MenuItem:=Sender as TMenuItem;
Height:=22;
Width:=ACanvas.TextWidth(MenuItem.Caption)+25;
if MenuItem.Caption='-' then s:='';
if ShortCutToText(MenuItem.ShortCut)<>'' then
begin
Width:=Width+ACanvas.TextWidth(ShortCutToText(MenuItem.ShortCut));
s:=MenuItem.Caption;
s:=s+' '+ShortCutToText(MenuItem.ShortCut);
(Sender as TMenuItem).Caption:=s;
end;
end;
在Windows 2000下一运行就蓝屏..我试了3次蓝了三次.,
就是(Sender as TMenuItem).Caption:=s;这句的问题,去掉就不蓝了.
各位看看..怎么回事...