I have been trying for days now to find a solution for my problem. I think the problem is simple but it won't work on my end and I'm not the best-experienced developer around the world. So Im using VB.net with CEFSharp and want to deactivate my browser to open links in new windows, I want that nothing happens then because I only have a web-based application which is included in Form1. So I already tried to translate some C# code:
Public Class BrowserLifeSpanHandler
Inherits ILifeSpanHandler
Public Function OnBeforePopup(ByVal browserControl As IWebBrowser, ByVal browser As IBrowser, ByVal frame As IFrame, ByVal targetUrl As String, ByVal targetFrameName As String, ByVal targetDisposition As WindowOpenDisposition, ByVal userGesture As Boolean, ByVal popupFeatures As IPopupFeatures, ByVal windowInfo As IWindowInfo, ByVal browserSettings As IBrowserSettings, ByRef noJavascriptAccess As Boolean, <Out> ByRef newBrowser As IWebBrowser) As Boolean
newBrowser = Nothing
Return True
End Function
But there are 2 errors. The first one is with the ILifeSpanHandler.
It says that classes can only inherit from other classes. Was it wrong to put the code snippet over the End Class of my Form1?
The second error is at <Out> ByRef newBrowser As IWebBrowser
.
Visual Studio says that type "Out" isnt defined. So what to put in there?
My main question: What do I have to change & why? :) Thanks.