將Label1 改成相應(yīng)的 label 控件名稱。
目前成都創(chuàng)新互聯(lián)已為1000多家的企業(yè)提供了網(wǎng)站建設(shè)、域名、網(wǎng)站空間、網(wǎng)站托管、服務(wù)器租用、企業(yè)網(wǎng)站設(shè)計(jì)、貞豐網(wǎng)站維護(hù)等服務(wù),公司將堅(jiān)持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長(zhǎng),共同發(fā)展。
'鼠標(biāo)經(jīng)過時(shí),顯示下劃線
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
'鼠標(biāo)離開時(shí),去除下劃線
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
Label1.Attributes.Add("onmouseover", "this.style.textDecoration='underline'"); //顯示下劃線
Label1.Attributes.Add("onmouseout", "this.style.textDecoration=''"); //隱藏下劃線
可以用樣式控制
this.style.textDecoration='underline'
顯示下劃線
this.style.textDecoration=''隱藏下劃線
具體你用在哪就可以了
沒有意思,為了便于理解,把兩個(gè)單詞分開而已,去掉無(wú)所謂的
文章標(biāo)題:vb.net加下劃線 vb中下劃線,刪除線怎么編程
地址分享:http://jinyejixie.com/article12/hehodc.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供做網(wǎng)站、、企業(yè)建站、網(wǎng)站維護(hù)、全網(wǎng)營(yíng)銷推廣、云服務(wù)器
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
網(wǎng)頁(yè)設(shè)計(jì)公司知識(shí)