屏蔽WINNT、WIN98中的开始菜单栏和功能键(100分)

  • 主题发起人 主题发起人 一剑封喉
  • 开始时间 开始时间

一剑封喉

Unregistered / Unconfirmed
GUEST, unregistred user!
在DELPHI5.0开发的应用程序运行时需要屏蔽掉开始菜单栏,但是本程序的界面不是最大化的<br>,当程序运行时已经屏蔽掉开始菜单和桌面,但是当双击已经被屏蔽掉的桌面时或者在NT中<br>按一下WINDOWS键,开始菜单栏便自动弹出。这样此程序便没有意义了,另外,WINDOWS NT 中<br>CTRL-ALT-DEL 功能不知道怎样才能屏蔽,恳请各位大侠指教。<br>ld001@fun.21cn.com<br>
 
用api函数,具体用法我一时想不起来,以后再告诉你,sorry!
 
热起键:<br>systemparametersinfo(spi_screensaverunning,1,@i,0)<br>i为1/0。<br>(好象是这个函数,不知有没敲错)
 
procedure hideTaskbar; //隐藏任务条!!!!!!<br>var wndHandle : THandle;<br>wndClass : array[0..50] of Char;<br>begin<br>StrPCopy(@wndClass[0], 'Shell_TrayWnd');<br>wndHandle := FindWindow(@wndClass[0], nil);<br>ShowWindow(wndHandle, SW_HIDE);<br>End;<br>屏蔽三个键!<br>var<br>  temp : integer;<br>  begin<br>   SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, @temp, 0);<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;~(0为取消!)<br>  end;<br>
 
WINDOWS NT 中 CTRL-ALT-DEL 功能 你是不能屏蔽的,要不微软完蛋了
 
gcq: 感谢你的回答,不过你说的答案我都用过,我说的意思是这些都已经应用在我的程序中,<br>当程序运行时桌面和任务条都已经被屏蔽,不过当双击被屏蔽的桌面或者在NT中按一下WIN键之后,<br>开始菜单栏就会出现(我的程序运行时不是最大化而且不能最大化的,故能双击桌面),所以麻烦各位<br>高手能不能想一想怎样屏蔽掉NT中的WIN键功能,或者取消双击桌面(将鼠标速度加快是可以办到的,不过<br>在我的程序中必须要用到双击)。<br>wjiachun:有这样的事情吗?那么我的程序那不就完蛋了吗?
 
啊哈,你在WINNT下编的,我这里的NT下不足安装D5,所以 没的试了!:(<br>不过,我愿听各位大虾的指教!!!!
 
gcq :就是98下面的也不能屏蔽掉双击桌面出现开始菜单的功能。请您在98中试一下好吗?多谢大侠!<br>小生这厢有礼了。
 
// &nbsp; &nbsp;讓使用者按下 Ctrl+Alt+Del 鍵時不會被顯示出來<br>// &nbsp;function RegisterServiceProcess(dwProcessID, dwType: Integer): Integer; stdcall; external 'KERNEL32.DLL';<br>// &nbsp; &nbsp;隐藏: &nbsp; &nbsp; &nbsp; &nbsp;RegisterServiceProcess(GetCurrentProcessID, 1);<br>// &nbsp; &nbsp;复现: &nbsp; &nbsp; &nbsp; &nbsp;RegisterServiceProcess(GetCurrentProcessID, 0);<br>这样应该可以。
 
下面是gcq给我的回复,希望各位评价!<br><br>procedure hideTaskbar; //隐藏 <br>var<br>wndHandle : THandle;<br>wndClass : array[0..50] of Char;<br>begin<br>StrPCopy(@wndClass[0], 'Shell_TrayWnd');<br>wndHandle := FindWindow(@wndClass[0], nil);<br>ShowWindow(wndHandle, SW_HIDE);<br>End;<br>procedure showTaskbar; //显示<br>var<br>wndHandle : THandle;<br>wndClass : array[0..50] of Char;<br>begin<br>StrPCopy(@wndClass[0], 'Shell_TrayWnd');<br>wndHandle := FindWindow(@wndClass[0], nil);<br>ShowWindow(wndHandle, SW_RESTORE);<br>end;<br>&nbsp;<br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br>SystemParametersInfo( SPI_SCREENSAVERRUNNING, 1, nil, 0); &nbsp;//屏蔽系统键<br>&nbsp; hidetaskbar;<br>end;<br>&nbsp;<br>procedure TForm1.Button2Click(Sender: TObject);<br>begin<br>SystemParametersInfo( SPI_SCREENSAVERRUNNING, 0,nil, 0); &nbsp; //恢复系统键<br>&nbsp; &nbsp;showTaskbar;<br>end;<br>&nbsp;<br><br>还有<br>在implementation后添加声明:<br>function RegisterServiceProcess(dwProcessID, dwType: Integer): Integer; stdcall; external 'KERNEL32.DLL';<br>&nbsp;<br>RegisterServiceProcess(GetCurrentProcessID, 1);//隐藏<br>RegisterServiceProcess(GetCurrentProcessID, 0);//显示<br>用ALT+DEL+CTRL看不见该程序!不知对你有没有用!
 
多人接受答案了。
 
后退
顶部