天天看點

判斷windows作業系統平台

private static intptr getsystraywnd()

{

intptr handle = findwindow("shell_traywnd", null);

handle = findwindowex(handle, intptr.zero, "traynotifywnd", null);

if (iswindowsxp || iswindows2000 || iswindows2003 || iswindowsvista || iswindows7)

if (iswindows2000)

handle = findwindowex(handle, intptr.zero, "toolbarwindow32", null);

return handle;

}

else

handle = findwindowex(handle, intptr.zero, "syspager", null);

最新内容請見作者的github頁:http://qaseven.github.io/

繼續閱讀