Solved

web browser

Posted on 2004-09-15
7
206 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 32

Expert Comment

by:Erick37
ID: 12068690
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
ID: 12068828
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_
ID: 12070308
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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

Author Comment

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

Author Comment

by:MTec89_
ID: 12070449
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
ID: 12070790
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_
ID: 12071027
thanks :) i got it working
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

751 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