[fpc-pascal] Want to create a program launcher for Windows 11, suggestions please.

Jean SUZINEAU jean.suzineau at wanadoo.fr
Tue Sep 9 01:30:44 CEST 2025


I haven't tested but I imagine you can use property AllowDropFiles on 
TForm to get the file paths of the shortcuts through the OnDropFiles 
event of TForm. They won't be removed from their source directory.

I think you can directly execute the shortcuts with ShellExecute from 
unit ShellAPI, no need to search the actual exe path.
And it's likely that with SHGetFileInfo with flag SHGFI_ICON ( 
https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shgetfileinfoa 
) from unit ShellAPI you can get directly an hIcon icon handle that you 
can use directly to display the Icon on your form.



More information about the fpc-pascal mailing list