你把prelead 和lead两个搞混了 你把使用prelead的地方都换成了lead:-) 下面是我原始代码 if not (prelead=nil) then prelead.BackColor :=preCol; preCol:=TLead(Sender).BackColor; TLead(Sender).BackColor:=clred; prelead:=TLead(Sender);
to Dlwxn(流云) 不好意思 对 大富翁 的规则不熟 不知道它是否与 CSDN 短信 相似的服务
project1.exe raised exception class EOleException with message '无效的特性值'.Process stoped.Use step or Run to continue.
不会的 if not (prelead=nil) then prelead.BackColor :=preCol; preCol:=TLead(Sender).BackColor; TLead(Sender).BackColor:=clred; prelead:=TLead(Sender);这段代码中比没有特别的地方 要不你跟踪一下
跟踪了,第一次的时候没有任何问题,每二次单击的时候,问题出现在if not (prelead=nil) then处,再F8的时候就会出现错误提示了
把这段代码放到你那里试试,怎么我单击一次再单击一次的时候边框的颜色还是黄色的? if not(MyLead=nil) then begin Mylead.FrameInnerThickness:=0; Mylead.FrameColor:=MyFreamCol; end; MyFreamCol:=clBlack;//TLEAD(Sender).BackColor; TLead(Sender).FrameThickness:=2; TLEAD(Sender).FrameColor:=clYellow; TLEAD(Sender).ForceRepaint;
所以最后一句可以不用要
上面是我在 大富翁上 给你留言
你把使用prelead的地方都换成了lead:-)
下面是我原始代码 if not (prelead=nil) then
prelead.BackColor :=preCol; preCol:=TLead(Sender).BackColor;
TLead(Sender).BackColor:=clred;
prelead:=TLead(Sender);
prelead:=TLead(Sender); //
这两句第一次一定执行 这就是赋值了
不好意思 对 大富翁 的规则不熟 不知道它是否与 CSDN 短信 相似的服务
if not (prelead=nil) then
prelead.BackColor :=preCol; preCol:=TLead(Sender).BackColor;
TLead(Sender).BackColor:=clred;
prelead:=TLead(Sender);这段代码中比没有特别的地方 要不你跟踪一下
你打开的DCM文件中有多少幅图 我用的是2幅图的文件来测试的
我昨天说的是
prelead /lead/precol都是全局变量 :-)
[email protected]
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls,Unit1, ExtDlgs,LTDICLib_TLB,LEADLib_TLB,ltDlltyp,
LTDLLUNT,ltDLLDef;type
TForm2 = class(TForm)
Panel1: TPanel;
Button1: TButton;
Button2: TButton;
SavePictureDialog1: TSavePictureDialog;
procedure Button1Click(Sender: TObject);
private
{ Private declarations } public
{ Public declarations }
procedure leadOnClick(Sender: TObject);
end;var
Form2: TForm2;
lead:TLEAD;
exeHandle:THandle;
prelead:TLEAD;
precol:TColor;
implementation
{$R *.dfm}procedure TForm2.Button1Click(Sender: TObject);
begin SendMessage(exeHandle,WM_CLOSE,0,0);
end;procedure TForm2.leadOnClick(Sender: TObject);
begin
ShowMessage(TLead(Sender).Name);
if not (prelead=nil) then
prelead.BackColor :=preCol; preCol:=TLead(Sender).BackColor;
TLead(Sender).BackColor:=clred;
prelead:=TLead(Sender);end;end.
但是 “短时间内入门”的渠道是有的 我们现在在讨论就是一个很有效的
首先不利于市场的发展 和人才梯队的建设 对公司发展不利 更重要的是 你又如何能切入到你心仪已久的通讯行业中呢? 如果他们只要有经验的人才的话:-)
if not(MyLead=nil) then
begin
Mylead.FrameInnerThickness:=0;
Mylead.FrameColor:=MyFreamCol;
end;
MyFreamCol:=clBlack;//TLEAD(Sender).BackColor;
TLead(Sender).FrameThickness:=2;
TLEAD(Sender).FrameColor:=clYellow;
TLEAD(Sender).ForceRepaint;