|
-
Jun 9th, 2001, 04:20 PM
#1
Hyperlink in VB Form
How can I easily add a simple HyperLink to a form? Can I put something in the Click() event?
-Steve
-
Jun 9th, 2001, 04:28 PM
#2
Fanatic Member
You could put this in the onclick event of something....
Set x = CreateObject("InternetExplorer.Application")
x.Visible = True
x.navigate url
maybe there is an easier way.....
"The difference between mad and genius is the success"
-
Jun 9th, 2001, 04:33 PM
#3
"Give a man a fish, he will eat for a day. Show the man HOW to fish, he will eat for a lifetime."
This is a pretty common question, I think I asked before myself. Click the search button, and type in "hyperlink label" and you will get about 15 different threads on the issue.
-
Jun 9th, 2001, 04:33 PM
#4
VB Code:
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 Label1_Click()
ShellExecute Me.hwnd, "Open", "http://www.vb-world.net", _
vbNullString, vbNullString, SW_SHOWNORMAL
End Sub
-
Jun 9th, 2001, 04:56 PM
#5
_______
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jun 9th, 2001, 04:58 PM
#6
Thanks guys.
I used the code that Mathew posted. The only thing I had to do is declare a constant SW_SHOWNORMAL with a value of 1.
-Steve
-
Jun 9th, 2001, 05:04 PM
#7
PowerPoster
To make the look more "real", you could make the label change color on mousemove and mouseout. And you can also set the font to underlined, Arial
-
Jun 9th, 2001, 05:37 PM
#8
I'm doing this on an Image control and there is no mouseout event. How else can I accomplish changing the mousepointer?
-Steve
-
Jun 9th, 2001, 06:27 PM
#9
changing mousepointer is easy.
There is a mouseicon property which you can set to your cursor and change the mousepointer property to 99(custom).
There isn't mousout for any control in VB.
Easy way..
Code:
Private Sub Form_MouseMove()
Label1.Color = vbBlue
End Sub
Private Sub Image1_MouseMove()
Label1.color = vbRed
End Sub
For the tough and more reliable way look in www.vbaccelerator.com
-
Jun 9th, 2001, 07:03 PM
#10
_______
<?>
the thread I posted has code to change the cursor....
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|