Welcome Guest Search | Active Topics | Sign In | Register

create new window and reset webview Options
czt
Posted: Friday, May 7, 2021 11:14:53 AM
Rank: Newbie
Groups: Member

Joined: 5/4/2021
Posts: 3
hi
my code:
Dim threadRunner As New ThreadRunner()
Dim webView1 As WebView = threadRunner.CreateWebView()
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
do
webView1.LoadUrlAndWait("https://xyxy.xy")
"here"
loop
end sub

1: i want replace "here" in above code with reset webview1 code

in fact i want reset or clean webview data after each request


2: i want create new window or new webview
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
"create new window or new webview"
end sub


In fact, my software is multi-threaded, and I want to create a new webview for every 10 threads that start each time, and delete the webview data(cookie and...) at the end of the commands for that thread.
It is also important that when other webview data is deleted or a new webview is created, the other thread webview's are not harmed.

thread ocde: (This code is executed ten times simultaneously)
Public Function config(account As String) As Object
If thread_status Then
Dim threadRunner As New ThreadRunner()
Dim webView1 As WebView = threadRunner.CreateWebView() (i dont know why web view not run with this code)
webView1.LoadUrlAndWait("https://xyxy.xy")
"clean webview1 data"
end function

thanks
eo_support
Posted: Friday, May 7, 2021 2:13:22 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

I am not exactly sure what you meant by "clean WebView1 data". There are multiple level of "clean". The shallowest level is to call Reload. The deepest level would involving deleting all cache/cookies data. If that's what you need, then you will need to destroy the WebView and ThreadRunner, stop the Engine and then clean the cache folder entirely.

Thanks!
czt
Posted: Friday, May 7, 2021 4:00:21 PM
Rank: Newbie
Groups: Member

Joined: 5/4/2021
Posts: 3
thanks

but i have another problem:

my software is multi-threaded, and I want to create a new webview for every 10 threads that start each time, and delete the webview data(cookie and...) at the end of the commands for that thread.
It is also important that when other webview data is deleted or a new webview is created, the other thread webview's are not harmed.

thread code: (This code is executed ten times simultaneously)
Public Function config(account As String) As Object
If thread_status Then
Dim threadRunner As New ThreadRunner()
Dim webView1 As WebView = threadRunner.CreateWebView()
webView1.LoadUrlAndWait("https://xyxy.xy") problem=====> webview not run with this code
end function
eo_support
Posted: Friday, May 7, 2021 4:09:00 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

Please PM us your order number, we need to verify your order number in order to continue provide support to you.

Thanks!


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.