当前位置:网站首页>看界面控件DevExpress WinForms如何创建一个虚拟键盘
看界面控件DevExpress WinForms如何创建一个虚拟键盘
2022-06-28 15:14:00 【界面开发小八哥】
在文本中,我们将为大家展示如何使用WinForms SvgImageBox编辑器来模拟虚拟键盘。
获取DevExpress WinForms v21.2正式版下载
为了帮助开始,我们创建了一个 GitHub 示例,您可以将其用作参考:SvgImageBox – Virtual keyboard from SVG file,复制示例 SVG 键盘图像并更改以下参数来满足您的要求:
- "keys"部分内的键数;
- 各个键的 X 和 Y 坐标;
- key的ID;
- 总 SVG 图像大小。
<?xml version="1.0" encoding="utf-8"?>
<svg width="Image_Width" height="Image_Height" ...>
<defs>
<g id="key">
<path .../>
<text ...>
<tspan ...">[key]</tspan>
</text>
</g>
</defs>
<g id="keys">
<use id="Key_ID" href="#key" transform="matrix(1, 0, 0, 1, Key_X, Key_Y)/>
...
</g>
</svg>您可以在任何类似记事本的编辑器中修改这些参数。

准备好键盘图像后,将其加载到 SvgImageBox 控件中,然后从我们的 GitHub 示例中复制并粘贴代码。 无论 SVG 键盘布局如何,这个通用代码都可以工作。 SendKeys.Send 方法将键值发送到激活文本字段,因此您无需将键盘绑定到各个输入框。
DevExpress WinForm拥有180+组件和UI库,能为Windows Forms平台创建具有影响力的业务解决方案。DevExpress WinForms能完美构建流畅、美观且易于使用的应用程序,无论是Office风格的界面,还是分析处理大批量的业务数据,它都能轻松胜任!
DevExpress技术交流群6:600715373 欢迎一起进群讨论
更多DevExpress线上公开课、中文教程资讯请上中文网获取
边栏推荐
- Leike defense: 4D millimeter wave radar products are expected to be mass produced and supplied by the end of the year
- [C language] implementation of binary tree and three Traversals
- Steve Jobs of the United States, died; China jobs, sold
- C语言学习-19-全排列
- sent2vec教程
- MySQL主从切换的超详细步骤
- sql语句 练习题
- 厨卫电器行业S2B2C系统网站解决方案:打造S2B2C平台全渠道商业系统
- Express模板引擎
- 云杉网络DeepFlow帮助5G核心网和电信云构建可观测性
猜你喜欢
一文教你快速生成MySQL数据库关系图

Fleet |「後臺探秘」第 3 期:狀態管理
![[C language] how to generate normal or Gaussian random numbers](/img/31/964e0922e698a3746599b840501cdf.png)
[C language] how to generate normal or Gaussian random numbers

Steve Jobs of the United States, died; China jobs, sold

C#/VB. Net to convert PDF to excel

Leetcode 48. Rotate image (yes, resolved)
Oracle11g database uses expdp to back up data every week and upload it to the backup server
![[C language] nextday problem](/img/7b/422792e07dd321e3a37c1fff55c0ca.png)
[C language] nextday problem

动力电池,是这样被“瓜分”的

MongoDB 在腾讯零售优码中的应用
随机推荐
Facebook! Adaptive gradient defeats manual parameter adjustment
R语言ggplot2可视化:使用patchwork包(直接使用加号+)将一个ggplot2可视化结果和一段文本内容横向组合起来形成最终结果图
开源大咖说 - Linus 与 Jim 对话中国开源
ORACLE中dbms_output.put_line输出问题的解决过程
使用Karmada实现Helm应用的跨集群部署
ROS knowledge points - build an ROS development environment using vscode
spark sql 生成 json
code snippet
QQ被盗号后群发黄图,大批用户“社死”
With 120billion yuan, she will ring the bell for IPO again
第四大运营商,难成「鲶鱼」
vector详解+题目
R语言ggplot2可视化:使用patchwork包将3个ggplot2可视化结果自定义组合起来构成组合图、两个子图横向组合后和另外一个图纵向组合构成最终组合图
R语言使用nnet包的multinom函数构建无序多分类logistic回归模型、使用回归系数及其标准误计算每个系数对应的Z统计量的值
seata-server 1.5.0 如何支持mysql8.0?
[spatial & single cellomics] phase 1: Study on PDAC tumor microenvironment by single cell binding spatial transcriptome
[C language] nextday problem
Is PMP really useful?
SaaS application management platform solution in the education industry: help enterprises realize the integration of operation and management
鸟类飞行状态下穿戴式神经信号与行为数据检测记录系统的技术难点总结