摘要:
#region 设置键盘控件,让键盘的回车也能触发确定按钮 protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == Keys.Enter) { //button1.Focus(); b 阅读全文
posted @ 2021-08-07 14:36
Lee597
阅读(195)
评论(0)
推荐(0)
摘要:
记住是写在Programs.cs里面的,程序入口点如果不对,请自行修改using System;using System.Collections.Generic;using System.Linq;using System.Windows.Forms;using System.IO;using Wi 阅读全文
posted @ 2021-08-07 14:35
Lee597
阅读(279)
评论(0)
推荐(0)
摘要:
这是当textBox7文本框中无内容时,才可以运行的,且还关联了一个button3,如不需要,都可以删除if (string.IsNullOrEmpty(textBox7.Text)) { //此时弹出一个可以选择文件的窗体 OpenFileDialog fileDialog = new OpenF 阅读全文
posted @ 2021-08-07 14:35
Lee597
阅读(185)
评论(0)
推荐(0)
摘要:
打开界面时的隐藏,写于Form_A界面,要打开的是Form_B界面 Form_A界面中在触发事件里这样写:private void button1_Click(object sender, EventArgs e) { try { Form_B B = new Form_B(this); this. 阅读全文
posted @ 2021-08-07 14:35
Lee597
阅读(174)
评论(0)
推荐(0)
摘要:
#region 点击右上角X按钮关闭事件 protected override void WndProc(ref Message msg) { const int WM_SYSCOMMAND = 0x0112; const int SC_CLOSE = 0xF060; // 点击winform右上关 阅读全文
posted @ 2021-08-07 14:34
Lee597
阅读(304)
评论(0)
推荐(0)

浙公网安备 33010602011771号