在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, sButton, sEdit; type TForm1 = class(TForm) sEdit1: TsEdit; sButton1: TsButton; procedure sButton1Click(Sender: TObject); private { Private declarations } public { Public declarations } function GetGUID: string; end; var Form1: TForm1; implementation {$R *.dfm} { TForm1 } function TForm1.GetGUID: string; var LTep: TGUID; sGUID: string; begin CreateGUID(LTep); //更新GUID sGUID := GUIDToString(LTep); sGUID := StringReplace(sGUID, '-', '', [rfReplaceAll]); //去掉-线 sGUID := Copy(sGUID, 2, Length(sGUID) - 2); //去掉大括号 Result := sGUID; end; procedure TForm1.sButton1Click(Sender: TObject); begin sEdit1.Text:= GetGUID; end; end. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论