C# ExtractIcon函数和ShellExecute函数问题(只回答一个也给分!)
问题一:
[DllImport("shell32.dll", EntryPoint="ShellExecute")]
public static extern int ShellExecute (
int hwnd,
string lpOperation,
string lpFile,
string lpParameters,
string lpDirectory,
int nShowCmd
);
那个hwnd参数如何赋值呢? 有时候有的应用程序启动前会有个消息对话框,我赋值为0时,只显示对话框,主程序不显示!
问题二:
[DllImport("shell32.dll", EntryPoint="ExtractIcon")]
public static extern int ExtractIcon (
int hInst,
string lpszExeFileName,
int nIconIndex
);
那个hInst参数如何赋值呢? 我赋值为this.handle 但是不知道对不对。还有这个函数返回值是图标的句柄,如何得到句柄所指向的图标呢? 困惑中!。。。
谢谢各位高手了
再次感谢...