// 「執行 notepad」  
  ShellExecute(Handle, nil, 'notepad',  nil, nil, SW_SHOWNORMAL);  
  // 「打開 word 檔」  
  ShellExecute(Handle, 'open', 'C:\a.doc',  nil, nil, SW_SHOWNORMAL);  
  // 「列印 excel 檔」  
  ShellExecute(Handle, 'print', 'C:\a.xls',  nil, nil, SW_SHOWNORMAL);  
  // 「開網頁」  
  ShellExecute(Handle, nil, 'http://www.borland.com/',  nil, nil, SW_SHOWNORMAL);  
  // 「寄信」  
  ShellExecute(Handle, nil, 'mailto:name@host.com?subject=主旨&body=內文',  nil, nil, SW_SHOWNORMAL);  
  // 「我的電腦」  
  ShellExecute(0, 'open', '::{20D04FE0-3AEA-1069-A2D8-08002B30309D}', nil, nil, SW_NORMAL);  
  // 「網路上的芳鄰」  
  ShellExecute(0, 'open', '::{208D2C60-3AEA-1069-A2D7-08002B30309D}', nil, nil, SW_NORMAL);  
  // 「我的文件」  
  ShellExecute(0, 'open', '::{450D8FBA-AD25-11D0-98A8-0800361B1103}', nil, nil, SW_NORMAL);  
  // 「控制台」  
  ShellExecute(0, 'open', '::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}', nil, nil, SW_NORMAL);  
  // 「印表機」  
  ShellExecute(0, 'open', '::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{2227A280-3AEA-1069-A2DE-08002B30309D}', nil, nil, SW_NORMAL);  
2014年1月23日 星期四
使用ShellExecute呼叫外部程式
訂閱:
張貼留言 (Atom)
 
沒有留言:
張貼留言