Start InternetExplorer with StartupInfo

Apr 7 2005 11:51 AM
Hi! I have some code to start the IE via CreateProcess but I'd like to start it with some startup parameters (like: no statusbar, no menu and so on). I think I could do that with STARTUPINFO (see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/startupinfo_str.asp). Unfortunately I do not really know how to use that. The code I have till now: ---- [DllImport("coredll.Dll")] private static extern int CreateProcess(string strImageName, string strCmdLine, IntPtr pProcessAttributes, IntPtr pThreadAttributes , int bInheritsHandle, int dwCreationFlags, IntPtr pEnvironment, IntPtr pCurrentDir, Byte[] bArray, ProcessInfo oProc); private void StartIE( ) { ProcessInfo pi = new ProcessInfo(); CreateProcess("iexplore.exe", "www.google.com", IntPtr.Zero, IntPtr.Zero, 0, 0, IntPtr.Zero, IntPtr.Zero, new Byte[128], pi); } public class ProcessInfo { public int Process; public int Thread; public int ProcessID; public int ThreadID; } // Do not know how to use .... [StructLayout(LayoutKind.Sequential)] public struct STARTUPINFO { public int cb; public String lpReserved; public String lpDesktop; public String lpTitle; public uint dwX; public uint dwY; public uint dwXSize; public uint dwYSize; public uint dwXCountChars; public uint dwYCountChars; public uint dwFillAttribute; public uint dwFlags; public short wShowWindow; public short cbReserved2; public IntPtr lpReserved2; public IntPtr hStdInput; public IntPtr hStdOutput; public IntPtr hStdError; } ---- Thanks. silverfish