paszlib1.1.4版,很好用,但有一个很大的Bug,我也没有仔细查找,好像跟DELPHI的内部函数,POS,Copy冲突,不信大家可以测试,希望能找出解决方法: 测试代码如下: procedure TForm1.Button1Click(Sender: TObject); var s,CurX,CurY: string; //Bmp: Tbitmap; //CompressedStream:TMemoryStream; begin s:='450-350'; if Pos('-',s)>0 then //设置光标位置 begin CurX:=Copy(s,1,Pos('-',s)-1); CurY:=Copy(S,Pos('-',s)+1,Length(S)-Pos('-',s)+1); SetCursorPos(StrToInt(CurX),StrToInt(CurY)); end; end;
没有在Uses中加入Paszlib单元的引用,一切正常,如果加入后再次编译将会提示如下错误: [Error] Unit1.pas(37): ')' expected but ',' found [Error] Unit1.pas(39): Missing operator or semicolon [Error] Unit1.pas(39): ')' expected but ',' found [Error] Unit1.pas(43): '.' expected but ';' found [Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
希望高物能帮忙解决一下! |