A
awfigsk
Unregistered / Unconfirmed
GUEST, unregistred user!
Handle:=FindWindow(nil,'C:/windows/system32/cmd.exe');<br> if Handle<>0 then<br> begin<br> SHOWWINDOW(handle,sw_hide);<br> OldLong:=SetWindowLong(handle,GWL_EXSTYLE,WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);<br> ShowMessage(IntToStr(GetLastError));<br> SHOWWINDOW(handle,sw_Restore);<br> end;<br><br>GetLastError返回的错误代码是5,我查看了MSDN,代码的意思是Access is denied.,是不是对CMD窗口进行操作?<br>还请大富翁们指点,谢谢!