-
Mar 17th, 2023, 10:40 AM
#41
Thread Starter
Hyperactive Member
Re: Help needed on RC6, Webview2
All i asked was when the next release of RC6 will be.
-
Mar 23rd, 2023, 04:35 AM
#42
Re: Help needed on RC6, Webview2
-
Mar 25th, 2023, 09:21 AM
#43
Member
Re: Help needed on RC6, Webview2
hello Olaf
In a previous post you said:
 Originally Posted by Schmidt
Have just added the NavigationStarting-Event (including a Cancel-Param) to new version 6.0.13
(which I will upload at the start of the next week)...
HTH
Olaf
Will RC 6.0.013 be available soon ?
I would like to be able to use the NavigationStarting event
Sincerely
François
-
May 29th, 2023, 02:03 AM
#44
Re: Help needed on RC6, Webview2
 Originally Posted by saturnian
hello Olaf
In a previous post you said:
Will RC 6.0.013 be available soon ?
I would like to be able to use the NavigationStarting event
JFYI: Have just uploaded this version - here's a longer comment about the 2 new Events:
https://www.vbforums.com/showthread....=1#post5607162
Olaf
-
May 29th, 2023, 05:00 AM
#45
Thread Starter
Hyperactive Member
Re: Help needed on RC6, Webview2
 Originally Posted by Schmidt
tks Olaf
works great.
tks
-
May 29th, 2023, 05:20 AM
#46
Thread Starter
Hyperactive Member
Re: Help needed on RC6, Webview2
one more question.
previously , with the webrowser control. I could right click a link and raise my own menu.
how can i do this with RC6
ie cancel the default menu and use my own.
-
May 29th, 2023, 05:35 AM
#47
Member
Re: Help needed on RC6, Webview2
 Originally Posted by Schmidt
Thank you very much Olaf
Congratulations again for your wonderful work.
François
-
May 29th, 2023, 05:51 AM
#48
Re: Help needed on RC6, Webview2
You can use JS to block the right click operation. Then JS calls VB to display a menu.
-
May 29th, 2023, 05:55 AM
#49
Re: Help needed on RC6, Webview2
 Originally Posted by SearchingDataOnly
Also, I can't imagine what kind of business model twinBasic should adopt to survive. If twinBasic had been born 15 years earlier, twinBasic might have been able to adopt the business model it currently intends to adopt (closed source and survive by selling licenses), but for now, it is clearly unlikely to succeed. We all hope that Wayne could make more money with twinBasic, so that twinBasic will have better development prospects. But unless Wayne gets big venture capital and assembles his own development team, the opportunity to make big money won't come up.
B4a, b4i, they also sold licenses at the beginning, and then they licensed the development of Android tools for free for everyone to use.
Because they get investments from other companies.
As long as the product is good enough, plus you have to contact those big companies to negotiate acquisition or cooperation opportunities, you can do more things with money.
-
May 29th, 2023, 09:45 AM
#50
Re: Help needed on RC6, Webview2
 Originally Posted by k_zeon
one more question.
previously , with the webrowser control. I could right click a link and raise my own menu.
how can i do this with RC6
ie cancel the default menu and use my own.
Here's an example:
Code:
Option Explicit
Private WithEvents WV As cWebView2
Private Sub Form_Load()
Visible = True
Set WV = New_c.WebView2(hWnd)
WV.AddScriptToExecuteOnDocumentCreated "top.addEventListener('mouseover',(e)=>{if(e.target)top.movr=e.target})"
WV.AreDefaultContextMenusEnabled = False '<-- that's the important setting here
WV.Navigate "https://vbForums.com"
End Sub
Private Sub Form_Resize()
If Not WV Is Nothing Then WV.SyncSizeToHostWindow
End Sub
Private Sub WV_UserContextMenu(ByVal ScreenX As Long, ByVal ScreenY As Long)
Debug.Print ScreenX, ScreenY, WV.jsProp("top.movr.tagName"), WV.jsProp("top.movr.id")
End Sub
If the incoming 2 params in WV_UserContextMenu(ScreenX, ScreenY) are already enough for your purposes,
then you will not need the little "last hovered-element-storage"-helper which was added via AddScriptToExecuteOnDocumentCreated in Form_Load().
Olaf
-
May 29th, 2023, 01:46 PM
#51
Thread Starter
Hyperactive Member
Re: Help needed on RC6, Webview2
 Originally Posted by Schmidt
Here's an example:
Code:
Option Explicit
Private WithEvents WV As cWebView2
Private Sub Form_Load()
Visible = True
Set WV = New_c.WebView2(hWnd)
WV.AddScriptToExecuteOnDocumentCreated "top.addEventListener('mouseover',(e)=>{if(e.target)top.movr=e.target})"
WV.AreDefaultContextMenusEnabled = False '<-- that's the important setting here
WV.Navigate "https://vbForums.com"
End Sub
Private Sub Form_Resize()
If Not WV Is Nothing Then WV.SyncSizeToHostWindow
End Sub
Private Sub WV_UserContextMenu(ByVal ScreenX As Long, ByVal ScreenY As Long)
Debug.Print ScreenX, ScreenY, WV.jsProp("top.movr.tagName"), WV.jsProp("top.movr.id")
End Sub
If the incoming 2 params in WV_UserContextMenu( ScreenX, ScreenY) are already enough for your purposes,
then you will not need the little "last hovered-element-storage"-helper which was added via AddScriptToExecuteOnDocumentCreated in Form_Load().
Olaf
tks works ok.
how would i differenciate the links. on Left side of page i have a link to a web site.
in the middle of page i have links to people.
how can i make it so that the links of people i rightclick can have one menu and if i were to rightclick the website i either get a different menu or no menu at all
or how do i get the target url of link, i tried WV.jsProp("top.movr.url") and WV.jsProp("top.movr.target") but i get nothing
tks
Last edited by k_zeon; May 29th, 2023 at 02:02 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|