Hi everyone,
I am trying to develop a Winforms app using .NET FW 1.1 (don't want to
use 2.0 for this particular project) and am trying to use the IE
control.
It compiles and builds without any problems. However everytime I run
it in DEBUG and it comes to this line:
this.WebBrowser.Navigate("about:blank", ref flags, ref
targetFrame, ref postData, ref headers);
It throws this error:
System.OutOfMemoryException: Error creating window handle.
I am following this article here for instructions:
http://www.codeproject.com/csharp/ad...chostuihandler
Can anyone please advice how to get around this error; or if there is
an easier way to do this on .NET 1.1 (I need an embedded browser
control)?
Here is the stack-trace:
System.OutOfMemoryException: Error creating window handle. --->
System.NullReferenceException: Object reference not set to an instance
of an object.
at Program.Form1.Form1_Load(Object sender, EventArgs e) in c:
\program\form1.cs:line 92
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean
fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.IntCreate WindowEx(Int32
dwExStyle, String lpszClassName, String lpszWindowName, Int32 style,
Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent,
HandleRef hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.UnsafeNativeMethods.CreateWin dowEx(Int32
dwExStyle, String lpszClassName, String lpszWindowName, Int32 style,
Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent,
HandleRef hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.NativeWindow.CreateHandle(Cre ateParams cp)
--- End of inner exception stack trace ---
at System.Windows.Forms.NativeWindow.CreateHandle(Cre ateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Form.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Control.Show()
at Program.frmMain.mnuFileNew_Click(Object sender, EventArgs e) in
c:\program\frmmain.cs:line 312