📄 mylistview.cs
字号:
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Windows.Forms;
namespace NumListView
{
public partial class MyListView : System.Windows.Forms.ListView
{
public MyListView()
{
InitializeComponent();
}
public MyListView(IContainer container)
{
container.Add(this);
InitializeComponent();
}
private const int WM_HSCROLL = 0x114;
private const int WM_VSCROLL = 0x115;
protected override void WndProc(ref Message msg)
{
// 寻找WM_VSCROLL或WM_HSCROLL信息。
if ((msg.Msg == WM_VSCROLL) || (msg.Msg == WM_HSCROLL))
{
// 将焦点移至ListView以便让numericUpDown失去焦点。
this.Focus();
}
// 将信息传递给默认的处理函数。
base.WndProc(ref msg);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -