屏蔽任务栏和系统热键(如alt+tab,ctrl+alt+del,windows键等)就象屏幕保护一样,只能是这个界面,希望详细点,谢谢,在线等待。如果能解决,可以自己要求要多少分,不够我再加(能力范围内)!!!!

解决方案 »

  1.   

    ctrl+alt+del怎么屏蔽不用讲了,已经知道,谢谢
      

  2.   

    假定我们要设计一个Windows95的口令程序,该程序运行时需要覆盖整个桌面,并且不允许用户用Alt+Esc、Ctrl+Esc等系统组合键来切换到其他程序。为达到此目的,可按以下步骤: 将Form的FormStyle属性设为fsStayOnTop 
    将Form的WindowState属性设为wsMaximized 
    在Form的OnCreate事件处理过程中为Windows发送一个屏幕保护程序正在运行的消息 
    当程序结束时清除屏幕保护程序运行标志。 
    示例代码:procedure TForm1.FormCreate(Sender: TObject);
    var
      temp: Integer;
    begin
      SystemParametersInfo(SPI_SCREENSAVERRUNNING, 1, @temp, 0);
    end;procedure Form1.OnClose(Sender: TObject; var Action: TCloseAction);var
      temp: Integer;
    begin
      SystemParametersInfo(SPI_SCREENSAVERRUNNING, 0, @temp, 0);
    end;
      

  3.   

    屏蔽任务栏:
         隐藏:ShowWindows(handle,SW_HIDE);
         恢复:ShowWindows(handle,SW_RESTORE);
      

  4.   

    procedure TForm1.Button1Click(Sender: TObject);
    var
      WindowHandle       : THandle;
    begin
      WindowHandle := FindWindow ( 'Shell_TrayWnd' , 0  );
      ShowWindow ( WindowHandle , SW_SHOW );  //显示任务栏
      ShowWindow ( WindowHandle , SW_HIDE );  //隐藏任务栏
    end;
      

  5.   

    cg1120(代码最优化-§帮助那些值得帮助的人我的系统是2000
    我还是不能屏蔽windows和ctrl+esc键阿
      

  6.   

    给你找到一段:unit Main;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, ExtCtrls, StdCtrls;type
      TMainForm = class(TForm)
        EnableBtn: TButton;
        DisableBtn: TButton;
        AboutBtn: TButton;
        ExitBtn: TButton;
        Bell1: TBevel;
        Image: TImage;
        procedure AboutBtnClick(Sender: TObject);
        procedure FormCreate(Sender: TObject);
        procedure EnableBtnClick(Sender: TObject);
        procedure DisableBtnClick(Sender: TObject);
        procedure ExitBtnClick(Sender: TObject);
        procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
        procedure FormDestroy(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      MainForm: TMainForm;implementationuses Hook;{$R *.dfm}type
      // Declaration from VC++ WINUSER.H
      //
      PKBDLLHOOKSTRUCT = ^KBDLLHOOKSTRUCT;
      KBDLLHOOKSTRUCT = record
        vkCode: DWORD;
        scanCode: DWORD;
        flags: DWORD;
        time: DWORD;
        dwExtraInfo: DWORD;
      end;const
      LLKHF_ALTDOWN  = KF_ALTDOWN shr 8;
      WH_KEYBOARD_LL = 13;var
      hhkNTKeyboard: HHOOK; // 钩子句柄// 低级键盘钩子回调函数
    //
    function LowLevelKeyboardFunc(nCode: Integer; w_Param: WPARAM;
      l_Param: LPARAM): LRESULT; stdcall;
    var
      blEatKeystroke: Boolean;
      p: PKBDLLHOOKSTRUCT;
    begin
      blEatKeystroke := False;
      if nCode = HC_ACTION then
      begin
        case w_Param of
          WM_KEYDOWN,
          WM_SYSKEYDOWN,
          WM_KEYUP,
          WM_SYSKEYUP:
            begin
               p := PKBDLLHOOKSTRUCT(l_Param);           // 进行按键过滤
               blEatKeystroke := (((p^.vkCode = VK_TAB) and
                                  ((p^.flags and LLKHF_ALTDOWN) <> 0)) or
                                  ((p^.vkCode = VK_ESCAPE) and
                                  ((p^.flags and LLKHF_ALTDOWN) <> 0)) or
                                  ((p^.vkCode = VK_ESCAPE) and
                                  ((GetKeyState(VK_CONTROL) and $8000) <> 0)) or
                                  ((p^.vkCode = VK_DELETE) and
                                  ((p^.flags and LLKHF_ALTDOWN) <> 0) and
                                  ((GetKeyState(VK_CONTROL) and $8000) <> 0)));
            end;
        end; // End of Case
      end;
      if blEatKeystroke then
      begin
        Result := 1;       // 捕获这些组合键,按键消息由自己处理,必须返回 1
        Hook.ShowHookInfo; // 显示一个窗口,你可以改为自己的处理代码
      end
      else
        // 其他的按键,交由别的线程处理(过滤)
        Result := CallNextHookEx(0, nCode, w_Param, l_Param);
    end;procedure TMainForm.AboutBtnClick(Sender: TObject);
    begin
      Application.MessageBox(
        PChar('Windows NT 键盘钩子演示程序'#13#10#13#10'作者:Phoenix2000,2001年7月。'),
        '关于本程序', 0);
    end;procedure TMainForm.FormCreate(Sender: TObject);
    begin
      hhkNTKeyboard := 0; // 钩子句柄初值
    end;procedure TMainForm.EnableBtnClick(Sender: TObject);
    begin
      // 挂上键盘钩子
      //
      hhkNTKeyboard := SetWindowsHookEx(WH_KEYBOARD_LL,
                                        LowLevelKeyboardFunc,
                                        HInstance, 0);
      if hhkNTKeyboard <> 0 then
        Application.MessageBox('系统键盘钩子已经启动了!', '信息', 64)
      else
        Application.MessageBox('无法启动系统键盘钩子!', '错误', 16);
    end;procedure TMainForm.DisableBtnClick(Sender: TObject);
    begin
      // 解除键盘钩子
      //
      if hhkNTKeyboard = 0 then
        Application.MessageBox('系统键盘钩子已经被禁止了!', '警告', 48)
      else
      begin
        UnhookWindowsHookEx(hhkNTKeyboard); // 卸载钩子
        hhkNTKeyboard := 0;
        Hook.CleanHookForm; // 此行代码与钩子无关,不要误解,是我自己的窗体清除
        Application.MessageBox('成功卸载系统键盘钩子!', '信息', 64)
      end;
    end;procedure TMainForm.ExitBtnClick(Sender: TObject);
    begin
      Close;
    end;procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
    begin
      CanClose := (hhkNTKeyboard = 0);
      if not CanClose then
        Application.MessageBox('请先卸载系统键盘钩子,然后再退出本程序!', '警告', 48);
    end;procedure TMainForm.FormDestroy(Sender: TObject);
    begin
      if hhkNTKeyboard <> 0 then
      begin
        UnhookWindowsHookEx(hhkNTKeyboard);
        hhkNTKeyboard := 0;
      end;
      Hook.CleanHookForm;
    end;end.以上的代码在 NT 4.0 + SP3/Win 2000 下能捕获 Alt + Tab、Alt + ESC、Ctrl + ESC 这
    样的组合键