TextBox 显示横线
2024-08-26 22:08:22
public class Xtxt3 : TextBox
{
private bool m_underLine; public bool UnderLine
{
get { return m_underLine; }
set
{
if (this.m_underLine != value)
{
if (value)
{
this.BorderStyle = BorderStyle.None;
}
m_underLine = value;
}
}
}
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (m.Msg == 0xf || m.Msg == 0x14 || m.Msg == 0x85)
{
if (this.BorderStyle == BorderStyle.None)
{
if (m_underLine)
{
using (Graphics g = Graphics.FromHwnd(this.Handle))
{
g.DrawLine(SystemPens.ControlText, 0, this.Height - 1, this.Width - 1, this.Height - 1);
}
}
}
}
}
}
最新文章
- 《javascript面向对象精要》读书笔记
- mysql 命令(二)
- K3已被禁用的基础资料如何显示出来
- 安卓Design包之CoordinatorLayout配合AppBarLayout,ToolBar,TabLaout的使用
- lua 学习笔记(一)
- 基于 koajs 的前后端分离实践
- Java I/O---输入与输出
- Map,HashMap,LinkedHashMap,TreeMap比较和理解
- 你不可错过的Java学习资源清单(包含社区、大牛、专栏、书籍等)
- LinkedList 利用的是尾插法
- Java日志输出问题
- Unity入门&;物理引擎
- python创建与遍历List二维列表
- 小白也能看懂的插件化DroidPlugin原理(一)-- 动态代理
- 开始一个Android的appium实例
- zabbix-server启动报错解决
- “全栈2019”Java多线程第二十二章:饥饿线程(Starvation)详解
- Asakura的魔法世界
- hadoop YARN配置参数剖析—MapReduce相关参数
- sublime 字体设置
热门文章
- centos sqlite3安装及简单命令
- ISO/IEC 9899:2011 条款6.5.5——乘法操作符
- Django models中的meta选项
- System.getProperties 获取当前的系统属性
- nginx client_body_buffer_size
- idea的alt+enter可以从菜单点吗
- Win10安装Golang
- Android StickyListHeadersListView头部悬停 分组列表实现
- linux 给运行程序指定动态库路径
- LeetCode 459. 重复的子字符串(Repeated Substring Pattern)