procedure TForm2.btn10Click(Sender: TObject); begin ShellExecute(handle,'open','mailt', nil,nil,SW_SHOWNORMAL); end; procedure TForm2.btn11Click(Sender: TObject); begin ShellExecute(handle,'open','mailt617346799@qq.com',nil,nil,SW_SHOWNORMAL); end; p
shellExecute 函数原型及参数含义: function ShellExecute(hWnd:HWND;Operation,FileName,Parameters,Directory:PChar;ShowCmd:Integer):HINST;stdcall; ●hWnd:用于指定父窗口句柄.当函数调用过程出现错误时,它将作为Windows消息窗口的父窗口.例如,可以将其设置为应用程序主窗口句柄,即Application.Handle,也可以将其设置为桌面窗口句柄(用GetDesktopW