摘要:
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms; namespaceTestMyControls{classMyButton:Button{privateconstintWM_LBUTTONDOWN=0x201;privateconstintWM_LBUTTONDBLCLK=0x203;protectedoverridevoidWndProc(refMessagem){if(m.Msg==WM_LBUTTONDOWN||m.Msg==W 阅读全文
摘要:
const int WM_SYSCOMMAND = 0x112; const int SC_CLOSE = 0xF060; const int SC_MINIMIZE = 0xF020; const int SC_MAXIMIZE = 0xF030; protected override void WndProc(ref Message m) { if (m.Msg==WM_SYSCOMMAND) { if (m.WParam.ToInt32()==SC_MINIMIZE) { this.Close(); } } base.WndProc(ref m); } } 阅读全文
摘要:
//抽象类继承非抽象类的使用abstract class CloseForm : Manager { public abstract void Display(); public abstract void ShowMessageBox(); public void OutPutDatas() { } } class GateHome:CloseForm { public override void Display() { Console.WriteLine("Display CloseForm"); } public override void ShowMessageBo 阅读全文
摘要:
usingSystem;usingSystem.Collections.Generic;staticclassProgram{publicstaticboolIsContain(string[]str,inti){if(i==str.Length){returnfalse;}i++;if(str[i-1]=="2"){returntrue;}else{returnIsContain(str,i);}}staticvoidMain(){//BaseBbaseb=newBaseB();//baseb.MyFun();//判断字符串"1,2,34,24,56" 阅读全文