利用api实现网址链接.frm
来自「个人VB学习源码精选,自己学习时的一些编程小程序,希望对大家有帮助」· FRM 代码 · 共 46 行
FRM
46 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 1620
ClientLeft = 60
ClientTop = 345
ClientWidth = 3675
LinkTopic = "Form1"
ScaleHeight = 1620
ScaleWidth = 3675
StartUpPosition = 3 '窗口缺省
Begin VB.Label Label2
Caption = "E-mail:goldseal94@163.com"
Height = 315
Left = 540
TabIndex = 1
Top = 840
Width = 2355
End
Begin VB.Label Label1
Caption = "Http://go.163.com/goldseal94"
Height = 255
Left = 420
TabIndex = 0
Top = 240
Width = 2775
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Const Home = "http://go.163.com/goldseal94"
Private Const Email = "mailto:goldseal94@163.com"
Private Sub Label1_Click()
Dim HyperJump
HyperJump = ShellExecute(0&, vbNullString, Home, vbNullString, vbNullString, vbNormalFocus)
End Sub
Private Sub Label2_Click()
Dim HyperJump
HyperJump = ShellExecute(0&, vbNullString, Email, vbNullString, vbNullString, vbNormalFocus)
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?