visual basic(20)

2008-02-17 12:26 am
1)how to make a linklabel or a linkcommandbutton(just like --> when i clicked it , open http://www.yahoo.com.hk)
thxthxthxthxthxthx
更新1:

vb 6

回答 (2)

2008-02-23 6:16 pm
✔ 最佳答案
利用VB製作超連結的方法有兩種,一是利用VB內建的函數-Shell,一是利用API函數ShellExecute:

Private Sub Command1_Click()
 Shell "Explorer http://www.vbex.net", vbNormalFocus
End Sub

另一個方法:

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 Sub Command1_Click()
 ShellExecute Me.hWnd, vbNullString, "http://www.vbex.net", "", "", vbNormalFocus
End Sub

--------
VB範例網
http://www.vbex.net
2008-02-17 12:43 am
LinkLabel is component in VB.NET,you can use the linkclick event and add the following statment:
shell("explorer url")


收錄日期: 2021-04-20 21:08:41
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080216000051KK02720

檢視 Wayback Machine 備份