using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace GetFunctionKey
{
public partial class Frm_Main : Form
{
public Frm_Main()
{
InitializeComponent();
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F1)//判斷是否按下了F1功能鍵
{
MessageBox.Show("您按下了F1鍵!", "提示", MessageBoxButtons.OK);
}
}
}
}
评论