Another question web browser control |
Post Reply |
Author | |
shipwreck
Senior Member Joined: 18 April 2008 Location: United States Status: Offline Points: 308 |
Post Options
Thanks(0)
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 |
|
dentor
Senior Member Joined: 30 November 2005 Location: France Status: Offline Points: 102 |
Post Options
Thanks(0)
|
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.
|
|
shipwreck
Senior Member Joined: 18 April 2008 Location: United States Status: Offline Points: 308 |
Post Options
Thanks(0)
|
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 |
|
dentor
Senior Member Joined: 30 November 2005 Location: France Status: Offline Points: 102 |
Post Options
Thanks(0)
|
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?
|
|
shipwreck
Senior Member Joined: 18 April 2008 Location: United States Status: Offline Points: 308 |
Post Options
Thanks(0)
|
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 |
|
shipwreck
Senior Member Joined: 18 April 2008 Location: United States Status: Offline Points: 308 |
Post Options
Thanks(0)
|
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 |
|
dlederman
Newbie Joined: 21 March 2008 Status: Offline Points: 9 |
Post Options
Thanks(0)
|
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. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |