|
-
Nov 1st, 2000, 08:07 PM
#1
Thread Starter
Member
I am displaying a banner in my prog. and I was wondering how I could force the browser to open any links in a new window?
-
Nov 1st, 2000, 08:37 PM
#2
Code:
Private Sub webbrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Dim F As New Form1
Set ppDisp = F.webbrowser1.Object
Cancel = False
DoEvents
F.Show
End Sub
-
Nov 2nd, 2000, 02:28 PM
#3
Thread Starter
Member
This code didnt work. I want a new window, in internet explorer, not my program, to open and display the site which the banner linked to.
-
Nov 2nd, 2000, 02:54 PM
#4
Thread Starter
Member
This code didnt work. I want a new window, in internet explorer, not my program, to open and display the site which the banner linked to.
-
Nov 2nd, 2000, 04:12 PM
#5
Member
'this in your general declarations:
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
'this in your event that you want to launch the browser from:
Call ShellExecute(hwnddesk, "Open", "www.YourURLHere.com", directory, 0&, vbNormal)
-
Nov 2nd, 2000, 06:20 PM
#6
Or without API, simply use the standard Shell method and pass the website as an argument.
-
Nov 2nd, 2000, 07:31 PM
#7
Thread Starter
Member
Let me clarify what i want. I need code that would open a new internet explorer window when the user clicks the rotating banner on my form, and display which ever link was clicked. I NEED HELP!!!!!!
-
Nov 2nd, 2000, 08:49 PM
#8
ST15XA, that will open a new window! Use Megatron's code, it will open a new window always.
Are you wanting to add the Microsoft Internet Controls as a reference so that you can use IE? It would take up resources, but...
What the customer wants, the customer gets
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
|