|
-
May 18th, 2008, 06:36 PM
#1
Thread Starter
Hyperactive Member
Re: Web Browser New Window
Last edited by Philly0494; May 18th, 2008 at 06:39 PM.
-
May 19th, 2008, 03:25 AM
#2
Lively Member
Re: Web Browser New Window
I used browser 2.0 library.
I got rid of the midichild stuff and I did make custom callbacks.
it's not complete. But here is a downized image of it.
I have it where you can set custom colors on the options page.
http://i56.photobucket.com/albums/g1...mybroswer1.jpg
I used my own Buttons instead of tabstrip.
Some simple code used.
Code:
Private Sub Cmd1_Click() ''Starts the command Sub
On Error GoTo a:
brwWebBrowser.GoBack
a: 'Refresh
End Sub
Private Sub Cmd2_Click()
On Error GoTo a:
brwWebBrowser.Gofoward '' Goes back to the previous page
a: 'Refresh
End Sub
Private Sub Cmd3_Click()
On Error GoTo a:
brwWebBrowser.GoHome '' Goes to the home page
a: 'Refresh
End Sub
Private Sub Cmd4_Click()
On Error GoTo a:
brwWebBrowser.Refresh '' Refresh
a: 'Refresh
End Sub
Private Sub Cmd5_Click()
On Error GoTo a:
brwWebBrowser.Navigate CboAddress
CboAddress.SetFocus
a: 'Refresh
End Sub
Private Sub Window_Click()
ShellExecute hWnd, vbNullString, (App.Path & "\MyBrowser.exe"), _
vbNullString, vbNullString, vbNormalFocus
End Sub
I misunderstood the question.
I didnt have the link set to open new window yet.
I do now. Thanks.
The problem now is getting the new window to open with my preferences for the first window.
My color scheme isn't loading.
.
Last edited by Jabber; May 19th, 2008 at 03:59 AM.
-
Jun 5th, 2008, 07:00 PM
#3
Member
Re: Web Browser New Window
Here is my code.
Note: your objects can meet the requirements, but be careful. Rename if nescessary, or you'll get an error.
Code:
Private Function Popups() As Boolean
Dim frmAds As Form
Dim ppDisp As Object
Dim Cancel As Boolean
Set frmAds = New frmWebBrowser
Set ppDisp = frmAds.WebBrowser1.Object
If Popups = False Then
Cancel = False
frmAds.Visible = True And Fasle
Unload frmAds
End If
End Function
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Dim frmNewWindow As Form, Popups As Boolean
Set frmNewWindow = New frmWebBrowser
Set ppDisp = frmNewWindow.WebBrowser1.Object
WebBrowser1.RegisterAsBrowser = True
frmNewWindow.Show
Popups = False
End Sub
This code is a Popup blocker and New window opener
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
|