|
You last visited: Today at 12:34
Advertisement
Help with VB .NET
Discussion on Help with VB .NET within the DarkOrbit forum part of the Browsergames category.
02/01/2016, 02:34
|
#1
|
elite*gold: 0
Join Date: Dec 2011
Posts: 5
Received Thanks: 0
|
Help with VB .NET
I have a problem I want to open the game map in my program through webbrowser1.navigate("http://cz1.darkorbit.bigpoint.com/indexInternal.es?action=internalMapRevolution"), It's not work to me, even if I add a reference &dosid=my sid, in a normal browser I both work, but in visual studio I'm just a black screen loads, do not know what was repeated. Sorry for the bad English, maybe you will understand my problem and thank you for your answers.
|
|
|
02/01/2016, 06:21
|
#2
|
Moderator
elite*gold: 2072
Join Date: Mar 2013
Posts: 10,536
Received Thanks: 6,655
|
Clear Cache at at everytime when the Program Start.
|
|
|
02/01/2016, 09:35
|
#3
|
elite*gold: 36
Join Date: Oct 2015
Posts: 927
Received Thanks: 207
|
here is it
Shell("RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8 ")
Sub Clear_Temp_Files()
Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8 "
End Sub
Sub Clear_Cookies()
Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2"
End Sub
Sub Clear_History()
Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1"
End Sub
Sub Clear_Form_Data()
Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16"
End Sub
Sub Clear_Saved_Passwords()
Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32"
End Sub
Sub Clear_All()
Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255"
End Sub
Sub Clear_Clear_Add_ons_Settings()
Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351"
End Sub
That should work
|
|
|
02/01/2016, 10:55
|
#4
|
elite*gold: 0
Join Date: Dec 2011
Posts: 5
Received Thanks: 0
|
Thanks for the answer when I'm at the computer I'll try, I 'll let you know how it turns out .
|
|
|
02/01/2016, 15:49
|
#5
|
Moderator
elite*gold: 2072
Join Date: Mar 2013
Posts: 10,536
Received Thanks: 6,655
|
Quote:
Originally Posted by KaloianBG
That should work
|
Vb.net is ugly.
@Te
Switch to C#
I will Show you later how to clear the Cache in C#.
|
|
|
02/01/2016, 16:34
|
#6
|
elite*gold: 36
Join Date: Oct 2015
Posts: 927
Received Thanks: 207
|
Quote:
Originally Posted by lkybl
Thanks for the answer when I'm at the computer I'll try, I 'll let you know how it turns out .
|
Don't say it, press it.
EDIT:
As like the "expert" - Dr.Toni said C# is much better than VB
|
|
|
02/01/2016, 20:25
|
#7
|
elite*gold: 0
Join Date: Dec 2011
Posts: 5
Received Thanks: 0
|
It work!!!!  Thanks!
|
|
|
02/01/2016, 21:03
|
#8
|
Moderator
elite*gold: 2072
Join Date: Mar 2013
Posts: 10,536
Received Thanks: 6,655
|
Here you have smarter versions:
C#
Code:
private void ClearFolder(DirectoryInfo folder)
{
FileInfo[] files = folder.GetFiles();
for (int i = 0; i < (int)files.Length; i++)
{
FileInfo file = files[i];
try
{
file.Delete();
}
catch (Exception exception)
{
}
}
DirectoryInfo[] directories = folder.GetDirectories();
for (int j = 0; j < (int)directories.Length; j++)
{
DirectoryInfo subfolder = directories[j];
this.ClearFolder(subfolder);
}
}
private void clearIECache()
{
this.ClearFolder(new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.InternetCache)));
}
Vb.net
Code:
Private Sub ClearFolder(folder As DirectoryInfo)
Dim files As FileInfo() = folder.GetFiles()
For i As Integer = 0 To CInt(files.Length) - 1
Dim file As FileInfo = files(i)
Try
file.Delete()
Catch exception As Exception
End Try
Next
Dim directories As DirectoryInfo() = folder.GetDirectories()
For j As Integer = 0 To CInt(directories.Length) - 1
Dim subfolder As DirectoryInfo = directories(j)
Me.ClearFolder(subfolder)
Next
End Sub
Private Sub clearIECache()
Me.ClearFolder(New DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.InternetCache)))
End Sub
I hope that I didn't miss something.
|
|
|
02/01/2016, 22:41
|
#9
|
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
|
InetCpl.cpl,ClearMyTracksByProcess 4351
clears anything.
better solution and with just 1 line
|
|
|
02/02/2016, 03:14
|
#10
|
elite*gold: 0
Join Date: Dec 2012
Posts: 469
Received Thanks: 395
|
that's a bug with theinternet explorer engine , like peopole said upped , clear tje cache using their codes
( to switch to gecko browser like me hehe)
|
|
|
All times are GMT +1. The time now is 12:35.
|
|