Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

web browser

Posted on 2004-09-15
7
Medium Priority
?
209 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
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 100 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

824 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