|
-
Oct 8th, 2000, 01:13 PM
#1
Thread Starter
The picture isn't missing
how do i make a label that when clicked it will open a new IE window and goto an address i specified?
-
Oct 8th, 2000, 01:16 PM
#2
Frenzied Member
I believe there is a tip on that...should be called something like, "creating hyperlinks in richtextbox's"...
-
Oct 8th, 2000, 01:20 PM
#3
Thread Starter
The picture isn't missing
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Oct 8th, 2000, 01:23 PM
#4
Try this:
Code:
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
Public Const SW_SHOWNORMAL = 1
Private Sub Label1_Click()
ShellExecute Me.hwnd, vbNullString, "http://www.vb-world.net", vbNullString, "c:\", SW_SHOWNORMAL
End Sub
-
Oct 8th, 2000, 01:27 PM
#5
If it's only IE then there's a much simpler way.
First, add microsoft internet controls to your reference and:
Code:
Dim ie as New InternetExplorer
ie.Navigate "URL"
and you can have FULL control over IE.
-
Oct 8th, 2000, 01:34 PM
#6
Thread Starter
The picture isn't missing
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Oct 8th, 2000, 01:37 PM
#7
Did you add Microsoft Internet Controls as a reference?
Code:
Dim ie as New InternetExplorer
Private Sub Form_Load()
ie.Navigate "http://www.vb-world.net"
ie.Visible = True
End Sub
-
Oct 8th, 2000, 01:41 PM
#8
Thread Starter
The picture isn't missing
what is a reference? I have the internet control on the form but it has an error
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Oct 8th, 2000, 01:48 PM
#9
That is why you get the error. You set it as a Custom Control.
REFERENCE <> CUSTOM CONTROL
Add it as a Reference, it should be above the Custom Control item on the menu.
-
Oct 8th, 2000, 03:01 PM
#10
Frenzied Member
Nah, forget IE, use the ShellExecute method, doesn't take up resources and it easier to manage and also work for netscape (if that's the default browser, in fact in can be any program, as long as it's associated with URLS) so it reflects the users preference.
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Oct 8th, 2000, 07:33 PM
#11
You are right about that Jop. I did post the code, but he didn't say anything, so I thought he wanted to use the Microsoft Internet Control as a reference.
That just goes to show you, I'm right, as always .
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
|