Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

web browser

Posted on 2004-09-15
7
Medium Priority
?
208 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 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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…
Suggested Courses

730 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