예제 #1
0
 void MainFormLoad(object sender, EventArgs e)
 {
     notifyIcon1.Visible =true;
     this.kh = new KeyboardHook();
     this.kh.BeginHook();
     this.kh.OnKeyIntercepted += new KeyboardHook.KeyboardHookEventHandler(this.kh_OnkeyIntercepted);
 }
예제 #2
0
        void TempLoad(object sender, EventArgs e)
        {
            this.skinEngine1.SkinFile= Application.StartupPath + "\\Skins\\XPBlue.ssk";
            LoadMenu();

             Clipboard.Clear();
              int x = Cursor.Position.X;
              int y= Cursor.Position.Y;
              this.Location = new Point(x, y);//设置窗体在屏幕右下角显示
              AnimateWindow(this.Handle, 10, AW_SLIDE | AW_ACTIVE | AW_VER_NEGATIVE);
              ComboDB();
              CategoryComboDB();
              	if(oleCon.State.ToString().Equals("Closed"))
               	{
               		oleCon.Open();
               	}
              adapter = new OleDbDataAdapter("select * from Xls_MyTemp",oleCon);
              ds = new DataSet();
              adapter.Fill(ds, "MyTemp");
              dataGridView1.DataSource = ds.Tables[0];

              kh= new KeyboardHook();
             		  kh.BeginHook();
             		  kh.OnKeyIntercepted += new KeyboardHook.KeyboardHookEventHandler(this.kh_OnkeyIntercepted);
        }