T
ThunderMusic
Hi,
I have a custom form that works fine when I debug it or run it in release
mode but cannot be loaded in the designer... Actually, it can be loaded in
the designer when no control is on it, but the resizing tool (in the
designer) is offset both horizontally and vertically and when I put a
control on it, as soon as I save, the designer throws an exception (but
cannot be reproduced everytime) and the form cannot be loaded anymore unless
I remove all the controls from it... but the major problem is the offset of
the designer... also, I'm unable to move the newly added controls on my
form... I can resize them when I add them and after that cannot even select
them... this behavior happens when I want to use the custom form (inherit
forms of my projects from this form)...
When I want to see the form in the designer (the CustomForm itself inherited
from system.windows.forms.form) I receive and exception too (here it is)
Events cannot be set on the object passed to the event binding service
because a site associated with the object could not be located.
Hide
at
System.ComponentModel.Design.EventBindingService.EventPropertyDescriptor.SetValue(Object
component, Object value)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAttachEventStatement(IDesignerSerializationManager
manager, CodeAttachEventStatement statement)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager
manager, CodeStatement statement)
Events cannot be set on the object passed to the event binding service
because a site associated with the object could not be located.
Hide
at
System.ComponentModel.Design.EventBindingService.EventPropertyDescriptor.SetValue(Object
component, Object value)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAttachEventStatement(IDesignerSerializationManager
manager, CodeAttachEventStatement statement)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager
manager, CodeStatement statement)
Method 'System.Windows.Forms.Form.SetStyle' not found.
Hide
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags,
Binder binder, Object target, Object[] providedArgs, ParameterModifier[]
modifiers, CultureInfo culture, String[] namedParams)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager
manager, String name, CodeExpression expression)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager
manager, CodeStatement statement)
Does anybody know the solution to this kind of behavior? btw, it may be
relevant to say I'm using a custom message filter (IMessageFilter)
Thanks
ThunderMusic
I have a custom form that works fine when I debug it or run it in release
mode but cannot be loaded in the designer... Actually, it can be loaded in
the designer when no control is on it, but the resizing tool (in the
designer) is offset both horizontally and vertically and when I put a
control on it, as soon as I save, the designer throws an exception (but
cannot be reproduced everytime) and the form cannot be loaded anymore unless
I remove all the controls from it... but the major problem is the offset of
the designer... also, I'm unable to move the newly added controls on my
form... I can resize them when I add them and after that cannot even select
them... this behavior happens when I want to use the custom form (inherit
forms of my projects from this form)...
When I want to see the form in the designer (the CustomForm itself inherited
from system.windows.forms.form) I receive and exception too (here it is)
Events cannot be set on the object passed to the event binding service
because a site associated with the object could not be located.
Hide
at
System.ComponentModel.Design.EventBindingService.EventPropertyDescriptor.SetValue(Object
component, Object value)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAttachEventStatement(IDesignerSerializationManager
manager, CodeAttachEventStatement statement)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager
manager, CodeStatement statement)
Events cannot be set on the object passed to the event binding service
because a site associated with the object could not be located.
Hide
at
System.ComponentModel.Design.EventBindingService.EventPropertyDescriptor.SetValue(Object
component, Object value)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAttachEventStatement(IDesignerSerializationManager
manager, CodeAttachEventStatement statement)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager
manager, CodeStatement statement)
Method 'System.Windows.Forms.Form.SetStyle' not found.
Hide
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags,
Binder binder, Object target, Object[] providedArgs, ParameterModifier[]
modifiers, CultureInfo culture, String[] namedParams)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager
manager, String name, CodeExpression expression)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager
manager, CodeStatement statement)
Does anybody know the solution to this kind of behavior? btw, it may be
relevant to say I'm using a custom message filter (IMessageFilter)
Thanks
ThunderMusic