Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
Process.Start("www.naver.com")
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
Process.Start("www.naver.com")
End Sub
End Class
Private Sub LinkLabel1_LinkClicked(sender As System.Object, e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked Process.Start("www.google.com") End Sub
Private Sub Label1_Click(sender As System.Object, e As System.EventArgs) Handles Label1.Click Process.Start("www.google.com") End Sub
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load LinkLabel3.Links.Add(0, 2, "www.goole.com") End Sub
Private Sub LinkLabel3_LinkClicked(sender As System.Object, e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel3.LinkClicked Process.Start("www.google.com") End Sub End Class
** 연습해보기 **
* 아래의 그림처럼 LinkLabel의 "여기"를 클릭하면 이벤트가 발생하도록 해보세요
이 댓글을
* LinkLabel 속성에서 LinkArea의 값을 적적하게 바꿔준다
* 예) 0,2 - 0번째 글자부터 2번째 글자까지 지정
이 댓글을
LinkLabel 밑줄제거
속성 -> linkbehavior -> NeverUnderline 변경하면 됩니다
Public Class Form1
Private Sub LinkLabel1_LinkClicked(sender As System.Object, e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
Process.Start("www.google.com")
End Sub
Private Sub Label1_Click(sender As System.Object, e As System.EventArgs) Handles Label1.Click
Process.Start("www.google.com")
End Sub
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
LinkLabel3.Links.Add(0, 2, "www.goole.com")
End Sub
Private Sub LinkLabel3_LinkClicked(sender As System.Object, e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel3.LinkClicked
Process.Start("www.google.com")
End Sub
End Class
이 댓글을