vb.net文字加边线 vb在文本框中添加文字

vb.net中怎么给label设置下划线将Label1 改成相应的 label 控件名称 。
'鼠标经过时 , 显示下划线
Private Sub Label1_MouseEnter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.MouseEnter
Dim LabelFont As Font = New Font(Label1.Font.Name, Label1.Font.Size, FontStyle.Underline)
Label1.Font.Dispose()
Label1.Font = LabelFont
End Sub
'鼠标离开时 , 去除下划线
Private Sub Label1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.MouseLeave
Dim LabelFont As Font = New Font(Label1.Font.Name, Label1.Font.Size, FontStyle.Regular)
Label1.Font.Dispose()
Label1.Font = LabelFont
End Sub
VB中如何用代码给文字添加删除线?VB中用代码方式给文字添加下划线和删除线vb.net文字加边线,代码如下vb.net文字加边线:
//Underline属性添加下划线
Private Sub Check1_Click()
Label1.Font.Underline = IIf(Check1.Value = https://www.04ip.com/post/vbChecked, True, False)
End Sub
//Strikethrough属性添加删除线
Private Sub Check2_Click()
Label1.Font.Strikethrough = IIf(Check2.Value = https://www.04ip.com/post/vbChecked, True, False)
End Sub
vb.net的label怎么在鼠标移动过来时添加下划线?代码是什么?Label1.Attributes.Add("onmouseover", "this.style.textDecoration='underline'"); //显示下划线
Label1.Attributes.Add("onmouseout", "this.style.textDecoration=''"); //隐藏下划线
vb中给文字增大缩小加下划线加删除线粗体斜体代码'控件一个文本框text1,五个按钮command1至command5
Private Sub Command1_Click() '增大字体
Text1.FontSize = Text1.FontSize1
End Sub
Private Sub Command2_Click() '缩小字体
If Text1.FontSize2 Then Text1.FontSize = Text1.FontSize - 1
End Sub
Private Sub Command3_Click() '变换下划线
Text1.FontUnderline = Not Text1.FontUnderline
End Sub
Private Sub Command4_Click()'变换粗体
Text1.FontBold = Not Text1.FontBold
End Sub
Private Sub Command5_Click() '变换斜体
Text1.FontItalic = Not Text1.FontItalic
End Sub
【vb.net文字加边线 vb在文本框中添加文字】关于vb.net文字加边线和vb在文本框中添加文字的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站 。

    推荐阅读