Hello,
I'm getting following exception while setting myUsrCtrl.Visible = true.
System.OutOfMemoryException: Error creating window handle. --->
System.NullReferenceException: Object reference not set to an instance of an
object.
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.Control.SetVisibleCore(Boolea n value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
This is not a normal behaviour, also i'm using native activeX control in
same project. This exception is regularly coming after accessing activex and
then setting myUsrCtrl.Visible = true. Any dependency or something? Can't
really figure out any suggestion?
Thanks in advance.
Divyesh