DELPHI建立桌面快捷方式

2021-04-21 11:55:14 字數 323 閱讀 5880

由於我們是通過ole inte***ce實現此功能的,因此在程式單元的uses語句中要加入comobj、activex和shlobj這三個單元。

在單元的宣告部分加入以下**:

procedure createlink(programpath, programarg, linkpath, descr: string);

其中,programpath是快捷方式的目標檔案的全路徑(包括檔名和路徑);

programarg是目標檔案的引數;linkpath是快捷方式的全路徑;descr是對此快捷方式的描述。

在單元的實現部分加入以下**:

建立桌面快捷方式

bool createdesktopshotcut cstring strname,在桌面顯示的名稱 cstring strsourcepath 檔案絕對路徑名稱 pshell release strdestdir.format s path strdestdir strdestdir strnam...

VC MFC 建立桌面快捷方式

bool createdesktopshotcut cstring strname,cstring strsourcepath int i char path max path 1 cstring strdestdir i csidl desktopdirectory lpitemidlist pi...

Ubuntu 建立桌面快捷方式

一 第一種方式 1.安裝必要軟體 gnome panel python view plain copy sudo apt get install no install recommends gnome panel 2.開始建立桌面快捷方式 在terminal 中輸入如下命令 python view ...