Home > Software engineering >  VB increase the hyperlink function
VB increase the hyperlink function

Time:09-21

LblTip. Caption=""
If Weekday (Now, vbSunday)=2 Then
LblTip. Caption="today is Monday" & amp; VbCrLf & amp; "Refined jobs: to screen and iron remover, please check! Need semi-finished products sampling "
End the If
If Weekday (Now, vbSunday)=6 Then
LblTip. Caption="today is Friday" & amp; VbCrLf & amp; "Need semi-finished products sampling!"
End the If


I want to send this pop up "need semi-finished products sampling" make it super link, who can help me give directions the need how to write,

CodePudding user response:

The Label control is divided into two, you need to make it super links to a single, with another good cohesion,

Assume that for hyperlink is Lable1:

Private Sub Form_MouseMove (Button As an Integer, Shift the As an Integer, As Single X, Y As Single)
Label1. FontUnderline=False
Label1. ForeColor=vbBlack
End Sub

Private Sub Label1_MouseMove (Button As an Integer, Shift the As an Integer, As Single X, Y As Single)
Label1. FontUnderline=True
Label1. ForeColor=vbBlue
End Sub

So, when the mouse moves to it, it is displayed as a hyperlink,

Then, write a Label1_Click code to execute the website you need to link operation,

CodePudding user response:

1, set the label of the mouse to 99, choose the icon of a hand,
2, in the click event of the label, open the url,
  • Related