I am trying to embed a WebBrowser Control in a C# Winform Application. This sounds easy enough. However I discovered that the WebBrowser control eats up a lot of memory ever
The BASIC IDEA is,
"Kill myself, and reborn."
Windows will solve all memory problems.
but if you Close your application first, you can't start a new one.
So, START A NEW ONE, and CLOSE THE OLDER ONE.
First turn on a new one, and turn off an old one.
public void SOLVE_ALL_MY_MEMORY_PROBLEM()
{
System.Diagnostics.Process.Start("MyProgram.exe");
Application.Exit();
}
https://www.youtube.com/watch?v=aTBlKRzNf74
If there is a parameter,
public void SOLVE_ALL_MY_MEMORY_PROBLEM()
{
System.Diagnostics.Process.Start("MyProgram.exe", "PARA_para_dance");
Application.Exit();
}
Go to Program.cs
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if(args.Count() > 0)
Application.Run(new Form1(args[0]));
else
Application.Run(new Form1());
}
and, Go to Form1.cs and make another Form1()
public Form1()
{
InitializeComponent();
}
public Form1(string dance_name)
{
InitializeComponent();
...
}
or you can use temp file !!!