Solved

web browser

Posted on 2004-09-15
7
202 Views
Last Modified: 2010-05-02
im trying to make a web browser, but it seems that links open in IE instead of opening a nother copy of my browser. also i cant get my forward and previous browse buttons working, they crash if the user goes back or forward father than the hostory shows.
0
Comment
Question by:MTec89_
  • 4
  • 3
7 Comments
 
LVL 32

Expert Comment

by:Erick37
Comment Utility
From MS:

"The WebBrowser control supports a CommandStateChange event, which is fired whenever the Forward or Back buttons need to be enabled or disabled. "

http://support.microsoft.com/default.aspx?scid=kb;EN-US;163282

' A Visual Basic application can also implement this
' functionality in this manner:  

Private Const CSC_NAVIGATEFORWARD As Long = 1
Private Const CSC_NAVIGATEBACK As Long = 2


Private Sub WebBrowser_CommandStateChange(ByVal Command As Long,ByVal Enable As Boolean)

       Select Case Command
           Case CSC_NAVIGATEBACK
               YourBackButtonName.Enabled = Enable
           Case CSC_NAVIGATEFORWARD
               YourForwardButtonName.Enabled = Enable
       End Select

End Sub

0
 
LVL 32

Accepted Solution

by:
Erick37 earned 25 total points
Comment Utility
And I think this article will resolve the navigation issue:

How To Use the WebBrowser Control NewWindow2 Event
http://support.microsoft.com/support/kb/articles/Q184/8/76.ASP

Good Luck!
0
 

Author Comment

by:MTec89_
Comment Utility
Private Sub wWeb_NewWindow2(ppDisp As Object, Cancel As Boolean)
   Dim frmWB As frmMain
   Set frmWB = New frmMain
   frmWB.wWeb.RegisterAsBrowser = True
   Set ppDisp = frmWB.wWeb.Object
   frmWB.Visible = True
End Sub


ambiguous name "wWeb_NewWindow2"
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:MTec89_
Comment Utility
ignore last post from me. if i figuer out how to split points, ill accept u both
0
 

Author Comment

by:MTec89_
Comment Utility
even though i closed, i get resizing errors with the dialog, can u help me fix this

Private Sub Form_Resize()
    If Me.WindowState <> vbMinimized Then
        wWeb.Width = Me.Width - 105
        wWeb.Height = Me.Height - 1000 - StatusBar1.Height
        wWeb.Top = 400
        wWeb.Left = 0
        cboURL.Width = Me.Width - cboURL.Left - 150
    End If
End Sub
0
 
LVL 32

Expert Comment

by:Erick37
Comment Utility
You have to be sure that the result of your calculations do not result in negative numbers.

Instead of:
wWeb.Width = Me.Width - 105

do something like
w = Me.Width - 105
if w > 0 then wWeb.Width = w
0
 

Author Comment

by:MTec89_
Comment Utility
thanks :) i got it working
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Public Sub, Empty Cell 7 56
VBA Check for Character 9 69
DIR issue 7 45
SSRS expression Issue finding a string 10 49
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now