Tips (1541)
uses ComObj, ActiveX; function CreateGuid: string; var ID: TGUID; begin Result := ''; if CoCreateGuid(ID) = S_OK then Result := GUIDToString(ID); end; procedure TForm1.Button1Click(Sender: TObject); begin Edit1.Text := CreateGuid; // or: Edit1.Text := CreateClassID end;
Rate this tip: