Re: Want to create a program launcher for Windows 11, suggestions please.

Jean SUZINEAU via fpc-pascal <[email protected]> Tue, 9 Sep 2025 01:30:44 +0200
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <[email protected]>
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.

_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal