Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating a new Random GUID in the Delphi IDE

Tags:

guid

delphi

How I can generate a random new GUID inside of the Dephi IDE?

I am using Delphi 2007.

like image 773
Salvador Avatar asked Oct 23 '09 05:10

Salvador


3 Answers

Just press Ctrl + Shift + G

like image 152
RRUZ Avatar answered Oct 05 '22 07:10

RRUZ


Ctrl+Shift+G will place a new GUID at the current position in the editor.

It's formatted for use as an interface IID, i.e. with enclosing square brackets - [] - , but once you've got the GUID in the text editor you can do whatever you want with it - Copy/Cut it to the clipboard etc

like image 29
Deltics Avatar answered Oct 05 '22 08:10

Deltics


I had wondered why this didn't work for me, but now I found out that it depends on the selected keyboard-layout in the Delphi-Options (Options->Editor-Options->Keyboard).

With the classic IDE layout it really is Ctrl+Shift+G, but I usually use the VisualStudio-Emulation and there it is Ctrl+Alt+G instead.

like image 38
casiosmu Avatar answered Oct 05 '22 06:10

casiosmu