- 171 名前:デフォルトの名無しさん mailto:sage [2010/03/28(日) 14:50:31 ]
- >>163
public partial class Form1 : Form { [DllImport("user32.dll")] public static extern int GetKeyboardState(byte[] lpKeyState); static bool isOverType() { byte[] barr = new byte[256]; const int VK_INSERT = 0x2D; GetKeyboardState(barr); return 0 == (barr[VK_INSERT] & 0x01); } public Form1() { InitializeComponent(); setTextMode(); } void setTextMode() { toolStripStatusLabel1.Text = isOverType() ? "Ins" : "Ovr"; } private void richTextBox1_KeyUp(object sender, KeyEventArgs e) { setTextMode(); } } こんな感じでいいらしい。
|

|