日期:2014-05-17  浏览次数:21080 次

没找到适合的方法重写
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Forms;
using System.Drawing;
using System.Data;




namespace ClassLibrary4

{
 
    public partial class Button
    {

      private void Form_Activated(object sender, EventArgs e)
{

     //注册热键Shift+S,Id号为100。HotKey.KeyModifiers.Shift也可以直接使用数字4来表示。
     HotKey.RegisterHotKey(Handle, 100, HotKey.KeyModifiers.ESC, 0); 
     //注册热键Ctrl+B,Id号为101。HotKey.KeyModifiers.Ctrl也可以直接使用数字2来表示。
     HotKey.RegisterHotKey(Handle, 101, HotKey.KeyModifiers.Ctrl, Keys.B);
     //注册热键Alt+D,Id号为102。HotKey.KeyModifiers.Alt也可以直接使用数字1来表示。
     HotKey.RegisterHotKey(Handle, 102, HotKey.KeyModifiers.Alt, Keys.D);
}

//在FormA的Leave事件中注销热键。

        
 private void FrmSale_Leave(object sender, EventArgs e)
{
     //注销Id号为100的热键设定
     HotKey.UnregisterHotKey(Handle, 100);
     //注销Id号为101的热键设定
     HotKey.UnregisterHotKey(Handle, 101);
     //注销Id号为102的热键设定
     HotKey.UnregisterHotKey(Handle, 102);
}

public override void WndProc(ref Message m)这里出现没找到合适的方法重写?求破!
对象 命名空间

------解决方案--------------------
既然父类都没有,谈什么重写啊
------解决方案--------------------
public partial class Button:Form
------解决方案--------------------

------解决方案--------------------