Created
July 8, 2013 09:54
-
-
Save katopz/5947579 to your computer and use it in GitHub Desktop.
Open Internet Explorer -> hide menu bar, tool bar, status bar -> adjust width/height ->load local storage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Diagnostics; | |
using System.ComponentModel; | |
namespace Foo | |
{ | |
public class Bar | |
{ | |
public static void Main() | |
{ | |
string currentPath = Environment.CurrentDirectory; | |
/* | |
Just open it | |
Process.Start("IExplore.exe", currentPath+"\\contents\\home.html"); | |
*/ | |
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 }); | |
o.GetType().InvokeMember("Width", System.Reflection.BindingFlags.SetProperty, null, o, new object[] { 1050 }); | |
o.GetType().InvokeMember("Height", System.Reflection.BindingFlags.SetProperty, null, o, new object[] { 768 }); | |
o.GetType().InvokeMember("Navigate", System.Reflection.BindingFlags.InvokeMethod, null, o, new object[] { currentPath + "\\contents\\home.html" }); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This Code Opens up the IE browser in Background and not on top of visual studio..how do i make it show on top of visual studio?