Opening a browser and hiding the address bar, help!

Dec 23 2008 1:51 PM

I am working on a C# .Net project.

I am using the following code to open the browser from my application.

System.Diagnostics.Process process = new System.Diagnostics.Process();

process.StartInfo.UseShellExecute = true;

process.StartInfo.FileName = URL;

process.Start();

Now how can i hide my address bar when the browser opens up for my customers. Please help!!

I even saw this piece of code but i dont know how we pass the URL.

System.Type oType = System.Type.GetTypeFromProgID("InternetExplorer.Application");

object o = System.Activator.CreateInstance(oType);

o.GetType().InvokeMember("menubar", System.Reflection.BindingFlags.SetProperty, null, o, new object[] { 0 });

o.GetType().InvokeMember("toolbar", System.Reflection.BindingFlags.SetProperty, null, o, new object[] { 0 });

o.GetType().InvokeMember("statusBar", System.Reflection.BindingFlags.SetProperty, null, o, new object[] { 0 });

o.GetType().InvokeMember("addressbar", System.Reflection.BindingFlags.SetProperty, null, o, new object[] { 0 });

o.GetType().InvokeMember("Visible", System.Reflection.BindingFlags.SetProperty, null, o, new object[] { true });

 

 

 

 


Answers (5)