Hi,
I am working on a windows application whose primary task is to apply all the
properties of one control to another. Hence i am using the SetValue method of
the PropertyDescrip tor. The application works fine but throws an exception
when the properties of combobox have to be set to the new control of the same
type.
The error stack is :
Error creating window handle.
at System.Windows. Forms.NativeWin dow.CreateHandl e(CreateParams cp)
at System.Windows. Forms.Control.C reateHandle()
at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible)
at System.Windows. Forms.Control.C reateControl()
at System.Windows. Forms.Control.O nVisibleChanged (EventArgs e)
at System.Windows. Forms.Control.O nParentVisibleC hanged(EventArg s e)
at System.Windows. Forms.Control.O nVisibleChanged (EventArgs e)
at System.Windows. Forms.Scrollabl eControl.OnVisi bleChanged(Even tArgs e)
at System.Windows. Forms.Form.OnVi sibleChanged(Ev entArgs e)
at System.Windows. Forms.Control.O nParentVisibleC hanged(EventArg s e)
at System.Windows. Forms.Control.O nVisibleChanged (EventArgs e)
at System.Windows. Forms.Scrollabl eControl.OnVisi bleChanged(Even tArgs e)
at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at
System.Windows. Forms.Design.De signerFrame.Ove rlayControl.Wnd Proc(Message&
m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg,
IntPtr
wparam, IntPtr lparam)
at System.Componen tModel.ReflectP ropertyDescript or.SetValue(Obj ect
component,
Object value)
On debugging i found it breaks when the property 'Parent' is to be set.
There is no other place that it breaks. I am unable to get to the unmanaged
code that might be executing at this time.
Please help me how would i trace to the unmanaged code if that could a
possible problem in this situation.
Thanks
Serena
I am working on a windows application whose primary task is to apply all the
properties of one control to another. Hence i am using the SetValue method of
the PropertyDescrip tor. The application works fine but throws an exception
when the properties of combobox have to be set to the new control of the same
type.
The error stack is :
Error creating window handle.
at System.Windows. Forms.NativeWin dow.CreateHandl e(CreateParams cp)
at System.Windows. Forms.Control.C reateHandle()
at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible)
at System.Windows. Forms.Control.C reateControl()
at System.Windows. Forms.Control.O nVisibleChanged (EventArgs e)
at System.Windows. Forms.Control.O nParentVisibleC hanged(EventArg s e)
at System.Windows. Forms.Control.O nVisibleChanged (EventArgs e)
at System.Windows. Forms.Scrollabl eControl.OnVisi bleChanged(Even tArgs e)
at System.Windows. Forms.Form.OnVi sibleChanged(Ev entArgs e)
at System.Windows. Forms.Control.O nParentVisibleC hanged(EventArg s e)
at System.Windows. Forms.Control.O nVisibleChanged (EventArgs e)
at System.Windows. Forms.Scrollabl eControl.OnVisi bleChanged(Even tArgs e)
at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
at
System.Windows. Forms.Design.De signerFrame.Ove rlayControl.Wnd Proc(Message&
m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
at System.Windows. Forms.NativeWin dow.Callback(In tPtr hWnd, Int32 msg,
IntPtr
wparam, IntPtr lparam)
at System.Componen tModel.ReflectP ropertyDescript or.SetValue(Obj ect
component,
Object value)
On debugging i found it breaks when the property 'Parent' is to be set.
There is no other place that it breaks. I am unable to get to the unmanaged
code that might be executing at this time.
Please help me how would i trace to the unmanaged code if that could a
possible problem in this situation.
Thanks
Serena