/*
*상속안할경우 나오는 에러메세지*/
Microsoft (R) Visual C# Compiler version 4.8.4084.0
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.
This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to C# 5, which is no longer the latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.com/fwlink/?LinkID=533240
ex12.cs(18,26): error CS0115: 'WindowsFrmManage.ProcessCmdKey(ref NoName.Windows.Forms.Message,
NoName.Windows.Forms.Keys)': 재정의할 적절한 메서드를 찾을 수 없습니다.
ex12.cs(40,26): error CS0115: 'WindowsFrmManage.WndProc(ref NoName.Windows.Forms.Message)': 재정의할 적절한 메서드를 찾을 수 없습니다.
using NoName;
using NoName.Windows.Forms;
class Program
{
public static void Main(string[] args)
{
Application.Run(new WindowsFrmManage());
}
}
class WindowsFrmManage
{
public WindowsFrmManage() {}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
const int WM_KEYDOWN = 0x0100, WM_KEYUP = 0x0101, WM_CHAR = 0x0102, WM_SYSKEYDOWN = 0x0104, WM_SYSKEYUP = 0x0105, WM_PAINT = 0x000f, WM_SIZE = 0x0005;
if ((msg.Msg == WM_KEYDOWN) || (msg.Msg == WM_SYSKEYDOWN))
{
switch (keyData.ToString())
{
case "Down" :
break;
case "Escape" :
Application.Exit();
break;
default:
break;
}
}
return base.ProcessCmdKey(ref msg, keyData);
}
protected override void WndProc(ref Message m)//sdw_mh12e
{
const int WM_KEYDOWN = 0x0100, WM_KEYUP = 0x0101, WM_CHAR = 0x0102, WM_SYSKEYDOWN = 0x0104, WM_SYSKEYUP = 0x0105, WM_PAINT = 0x000f, WM_SIZE = 0x0005;
base.WndProc(ref m);
switch(m.Msg)
{
case WM_PAINT :
break;
default:
break;
}
}
}