oracle基础知识讲义

源代码在线查看: unitfrmmain.pas

软件大小: 11373 K
上传用户: anniesprite
关键词: oracle 基础知识 讲义
下载地址: 免注册下载 普通下载 VIP

相关代码

				unit unitFrmMain;
				
				interface
				
				uses
				  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
				
				type
				  TForm1 = class(TForm)
				    procedure FormCreate(Sender: TObject);
				    procedure FormClose(Sender: TObject; var Action: TCloseAction);
				  private
				    { Private declarations }
				    hotkeyid: integer;
				    procedure WMhotkeyhandle(var msg: Tmessage);
				      message WM_HOTKEY; //响应热键消息
				  public
				    { Public declarations }
				  end;
				
				var
				  Form1: TForm1;
				
				implementation
				
				{$R *.DFM}
				
				procedure TForm1.FormCreate(Sender: TObject);
				begin
				  hotkeyid := GlobalAddAtom(pchar
				    ('UserDefineHotKey')) - $C000;
				    //减去$C000是为了保证取值范围的限制
				  registerhotkey(handle, hotkeyid,
				    MOD_WIN or MOD_ALT or MOD_CONTROL, $41);
				    //热键为WIN键+ ctrl+Alt+A
				end;
				
				procedure TForm1.WMhotkeyhandle(var msg: Tmessage);
				
				begin
				  if (msg.LParamHi = $41) and
				    (msg.lparamLo = MOD_CONTROL or mod_Alt or MOD_WIN) then
				  begin
				    msg.Result := 1; //该消息已经处理
				    application.BringToFront;
				    ShowMessage('你已经按下热键')
				  end;
				end;
				
				procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
				begin
				  unregisterhotkey(handle, hotkeyid);
				  DeleteAtom(HotKeyID);
				end;
				
				end.
				
							

相关资源