Mega Code Archive

 
Categories / Delphi / Examples
 

Shortcuts

Creating Shortcuts In Code var MyITEMIDLIST: PITEMIDLIST; Path: String; begin SHGetSpecialFolderLocation(Form1.Handle,CSIDL_STARTMENU,MyITEMIDLIST); SetLength(Path,MAX_PATH); SHGetPathFromIDList(MyItemIDList,PChar(Path)); Path := Copy(Path,1,Pos(#0,Path)-1); ShowMessage(Path); end; {END CODE} This code displays the path to the start menu. You can get directly to the Start UP subfolder using the CSIDL_STARTUP value instead of CSIDL_STARTMENU. Many special folders can be found this way, check out the help in the WinAPI help on this.