摘要:
一、先在“解决方案资源管理器”框中的“引用”条目上右键添加.Net的System.Configuration.dll服务文件二、添加命名空间:using System.Configuration;添加app.config文件,里面代码为:<?xml version="1.0" encoding="utf-8" ?><configuration> <configSections> </configSections> <connectionStrings> <add name="Co 阅读全文
摘要:
首先设置:this.KeyPreview = true;//为了使OnKeyDown事件有效(这个设置可以在Form属性中IDE中设置,也可以在代码中设置。)然后添加如下代码: /// <summary> /// 实现摁下Ctrl+F,进行查找的功能。 /// </summary> /// <param name="e"></param> protected override void OnKeyDown(KeyEventArgs e) { //ctrl+f 查找 if (e.Control & e.KeyCode = 阅读全文