lable1。caption:= string(mybyte);

解决方案 »

  1.   

    我也无法,暂用下面的方法
    s:=''
    for i:=1 to 25 do begin
        if mybyte[i]=0 then break;
        s:=s+chr(mybyte[i])
    end;
    label1.caption:=s;
      

  2.   

    2468(火狐) 这肯定行!但是我这段程序要用在串口通讯上,实时性要求很高!所以这样恐怕不行!
    用过strpas 及相关函数吗???
      

  3.   

    label1.Caption := '';
    for i := 1 to 25 do
          label1.Caption := label1.Caption + inttostr(mybyte[i]);
      

  4.   

    希望大家看了能有答案!!!!1、
    procedure TForm1.Button1Click(Sender: TObject);var
      Buffer: PChar;
    begin
      GetMem(Buffer,Length(Label1.Caption) + Length(Edit1.Text) + 1);
      StrCopy(Buffer, PChar(Label1.Caption));
      StrCat(Buffer, PChar(Edit1.Text));
      Label1.Caption := Buffer;
      Edit1.Clear;
      FreeMem(Buffer);
    end;2÷
    uses SysUtils;
    var  A: array[0..79] of Char;
      S: String;
    begin
      S := 'Honk if you know Blaise.';
      StrPCopy(A, S);
      Canvas.TextOut(10, 10, string(A));
    end;
      

  5.   

    倚天不出,谁与争锋?
    看看我的零运行开销的代码:mybyte:array [1..25] of byte;
    mychars:array [1..25] of char absolute mybyte; // 加一行lable1.caption:= mychars; // 改一个词__________________________________________________________________________
    http://i58.boy.net.cn/ (抱歉,未建好)
    欢迎加入“Delphi的天空”互助邮件讨论组,我们的宗旨是:互相帮助,共同进步 
    mailto:[email protected]
    http://cn.groups.yahoo.com/group/delphi_sky/
    或: http://agui.delphibbs.com/
    紫光拼音输入法交流邮件组
    mailto:[email protected] 
    http://cn.groups.yahoo.com/group/unispim/
      

  6.   

    pchar和string差不多,只是结尾用\0结束Byte型的东西只有8位,处理不好会将两个Byte连起来,其含义可能会有变化。
    在SysUtils中,strpas是这样写的,你可以跟踪(CTRL+mouseclick)看到:
    function StrPas(const Str: PChar): string;
    begin
      Result := Str;
    end;