Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - Another question web browser control
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Another question web browser control

 Post Reply Post Reply
Author
Message
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Topic: Another question web browser control
    Posted: 28 February 2009 at 9:02am
Alright, since noone has an idea of how to display custom multiple context menu's within the web browser control. So, I have a question about the default menu provided inside the web browser control.


See how "Open in new tab" is disabled? That's the problem.
How can I get this enabled, and to have it open a new tab in my application just like internet explorer would perform?


Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
dentor View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2005
Location: France
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote dentor Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2009 at 10:44am
Hello Shipwreck,
 
To open the new web page in a new tab as internet explorer do, you must set (load) a new web browser control and open the new url in it:
    WB(2).Navigate NewUrl
 
If you want to prevent the actual web page to open in a new web page (will be open in internet explorer, if you don't prevent it), you can write:
 
Private Sub WB_NewWindow2(ppDisp As Object, Cancel As Boolean)
    Cancel = True
    WB.Navigate NewUrl
End Sub

to force the web page to open in the actual web control.
 
********************************************
Displaying multiple context menus seems to be a more complicated subject, I haven't explore yet.
 
I can perhap's give you a direction:
 
Add of course, a reference to Microsoft HTML Object Library
 
Place in the declaration section,
 
Private WithEvents Doc As HTMLDocument
 
' *** To set web document
Private Sub WB_DocumentComplete(ByVal pDisp As Object, URL As Variant)
  If (pDisp Is WB.Object) Then
         Set Doc = WB.document
  End If
End Sub
 
' *** To test right clic
Private Sub Doc_onmousedown()
Dim Elem As IHTMLElement
  Set Elem = Doc.parentWindow.event.srcElement
  With Elem
      If Doc.parentWindow.event.button = 2 Then
          Dim msg As String
          Select Case UCase$(.tagName)
          Case "A"
            ' HREF
          Case "IMG"
            ' IMG
          End Select
      End If
  End With
End Sub
 
Hope you can explore further.
 
Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2009 at 11:00am
Hey there Dentor.  I suppose you don't really understand my question in this topic, but I appreciate all that further info you provided.
What I mean in this post is that I know how to make new windows popup considerably, but I wanted to enable the Context Menu Item "Open in New Tab" so that I could use it just like the actual IE does. Get what I'm saying?
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
dentor View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2005
Location: France
Status: Offline
Points: 102
Post Options Post Options   Thanks (0) Thanks(0)   Quote dentor Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2009 at 11:45am
Ok I see.
 
For me the menu 'Open in new tab' is enabled.
Have you the same menu disabled in Internet Explorer or just in Web Control?
 
 
 
Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2009 at 1:28pm
Just in the web browser control.
If I open Internet Explorer, the menu item is enabled and works perfectly.
But in the codejock web browser control, it is disabled.
Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
shipwreck View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 April 2008
Location: United States
Status: Offline
Points: 308
Post Options Post Options   Thanks (0) Thanks(0)   Quote shipwreck Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2009 at 8:47pm
Hello?.. Lol.
Anyone out there?

Product: Xtreme Suite Pro (Active-X), Version 15.3.1

Platform: Windows 7 Ultimate SP1 (64Bit) & Windows XP Mode SP3 (32Bit)

Language: Visual Basic 6.0 SP6
Back to Top
dlederman View Drop Down
Newbie
Newbie
Avatar

Joined: 21 March 2008
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote dlederman Quote  Post ReplyReply Direct Link To This Post Posted: 20 November 2009 at 5:43pm
I had the same problem, although not using XTP's browser control, and found a solution.... thought I'd post it here.

Calling CoInternetSetFeatureEnabled() with FEATURE_TABBED_BROWSING will enable tabbed browsing for either the entire process or the calling thread, depending on a separate parameter that you specify.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.