资源简介
没有键盘的情况下,实现鼠标操作输入数字、或只有触摸显示器情况下使用
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace KeyBoard
{
public partial class Form1 : Form
{
/*
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.Exstyle |= (int)0x08000000L;
return cp;
}
}
* */
private const int WS_EX_TOOLWINDOW = 0x00000080;
private const int WS_EX_NOACTIVATE = 0x08000000;
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.Exstyle |= (WS_EX_NOACTIVATE | WS_EX_TOOLWINDOW);
cp.Parent = IntPtr.Zero;
return cp;
}
}
public Form1()
{
InitializeComponent();
}
private void button0_Click(object sender EventArgs e)
{
SendKeys.Send(“0“);
}
private void button1_Click(object sender EventArgs e)
{
SendKeys.Send(“1“);
}
private void button2_Click(object sender EventArgs e)
{
SendKeys.Send(“2“);
}
private void button3_Click(object sender EventArgs e)
{
SendKeys.Send(“3“);
}
private void button4_Click(object sender EventArgs e)
{
SendKeys.Send(“4“);
}
private void button5_Click(object sender EventArgs e)
{
SendKeys.Send(“5“);
}
private void button6_Click(object sender EventArgs e)
{
SendKeys.Send(“6“);
}
private void button7_Click(object sender EventArgs e)
{
SendKeys.Send(“7“);
}
private void button8_Click(object sender EventArgs e)
{
SendKeys.Send(“8“);
}
private void button9_Click(object sender EventArgs e)
{
SendKeys.Send(“9“);
}
//.
private void button11_Click(object sender EventArgs e)
{
SendKeys.Send(“.“);
}
//退格
private void button12_Click(object sender EventArgs e)
{
SendKeys.Send(“{BKSP}“);
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 490 2018-04-04 21:59 KeyBoard\KeyBoard\bin\Debug\KeyBoard.vshost.exe.manifest
文件 2566 2018-04-04 21:59 KeyBoard\KeyBoard\Form1.cs
文件 10778 2018-04-04 21:59 KeyBoard\KeyBoard\Form1.Designer.cs
文件 5817 2018-04-04 21:59 KeyBoard\KeyBoard\Form1.resx
文件 3729 2018-04-04 21:59 KeyBoard\KeyBoard\KeyBoard.csproj
文件 1451 2018-04-04 21:59 KeyBoard\KeyBoard\obj\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6890 2018-04-04 21:59 KeyBoard\KeyBoard\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 834 2018-04-04 21:59 KeyBoard\KeyBoard\obj\Debug\KeyBoard.csproj.FileListAbsolute.txt
文件 975 2018-04-04 21:59 KeyBoard\KeyBoard\obj\Debug\KeyBoard.csproj.GenerateResource.Cache
文件 2209 2018-04-04 21:59 KeyBoard\KeyBoard\obj\Debug\KeyBoard.csprojResolveAssemblyReference.cache
文件 11776 2018-04-04 21:59 KeyBoard\KeyBoard\obj\Debug\KeyBoard.exe
文件 180 2018-04-04 21:59 KeyBoard\KeyBoard\obj\Debug\KeyBoard.Form1.resources
文件 28160 2018-04-04 21:59 KeyBoard\KeyBoard\obj\Debug\KeyBoard.pdb
文件 180 2018-04-04 21:59 KeyBoard\KeyBoard\obj\Debug\KeyBoard.Properties.Resources.resources
文件 489 2018-04-04 21:59 KeyBoard\KeyBoard\Program.cs
文件 1354 2018-04-04 21:59 KeyBoard\KeyBoard\Properties\AssemblyInfo.cs
文件 2868 2018-04-04 21:59 KeyBoard\KeyBoard\Properties\Resources.Designer.cs
文件 5612 2018-04-04 21:59 KeyBoard\KeyBoard\Properties\Resources.resx
文件 1095 2018-04-04 21:59 KeyBoard\KeyBoard\Properties\Settings.Designer.cs
文件 249 2018-04-04 21:59 KeyBoard\KeyBoard\Properties\Settings.settings
文件 914 2018-04-04 21:59 KeyBoard\KeyBoard.sln
目录 0 2018-04-04 22:00 KeyBoard\KeyBoard\obj\Debug\TempPE
目录 0 2018-04-04 22:00 KeyBoard\KeyBoard\bin\Debug
目录 0 2018-04-04 22:00 KeyBoard\KeyBoard\obj\Debug
目录 0 2018-04-04 21:59 KeyBoard\KeyBoard\bin
目录 0 2018-04-04 21:59 KeyBoard\KeyBoard\obj
目录 0 2018-04-04 21:59 KeyBoard\KeyBoard\Properties
目录 0 2018-04-04 21:59 KeyBoard\KeyBoard
目录 0 2018-04-04 21:59 KeyBoard
----------- --------- ---------- ----- ----
............此处省略2个文件信息
- 上一篇:js实现页面展示图片
- 下一篇:LGK120S系列PLC解密
评论
共有 条评论