Custom controls moving around in VB .Net not C#

R

Ron

I have this weird problem...I have a custom composited control written in C#
comprising of a label and a textbox (in an assembly)

If I import the control into a C# Win Forms project and place several of the
controls on a page everything is fine...all of the positioning properties
are correctly serialized to the designer code and the controls remain in
their designtime positions. HOWEVER if I import the custom control into VB
..Net win Forms project and follow EXACTLY the same procedure, then I save
the form and close it...when i open the form back up the controls have all
moved and it is also reflected in the designer code. If I repeat the
procedure again, they move again but a different amount.

I have triple checked all properties and even removed the set mutator to no
avail.

Has anybody ever heard of this before? What can i do to troubleshoot this
problem?

Thanks for any info,
Ron
 
I

Ignacio Machin ( .NET/ C# MVP )

I have this weird problem...I have a custom composited control written in C#
comprising of a label and a textbox (in an assembly)

If I import the control into a C# Win Forms project and place several of the
controls on a page everything is fine...all of the positioning properties
are correctly serialized to the designer code and the controls remain in
their designtime positions.  HOWEVER if I import the custom control intoVB
.Net win Forms project and follow EXACTLY the same procedure, then I save
the form and close it...when i open the form back up the controls have all
moved and it is also reflected in the designer code.  If I repeat the
procedure again, they move again but a different amount.

I have triple checked all properties and even removed the set mutator to no
avail.

Has anybody ever heard of this before?  What can i do to troubleshoot this
problem?

Thanks for any info,
Ron

Hi,

Compare the code generated by the IDE in both cases, one thing you do
not mention though, is if the movement is inside your control or in
the form, or in other words the controls inside your control or your
control in the form
 
R

Ron

Ignacio,

Thank you for the reply.

We narrowed it down to a 3rd party control and one of the properties in our
control was not setting the base property correctly. It appeared to be
happening differently in VB .Net than C# .Net but the reality is that we
didn't have the control in our C# project, which ended up being the issue.

Thank you for your reply.
Ron


message
I have this weird problem...I have a custom composited control written in
C#
comprising of a label and a textbox (in an assembly)

If I import the control into a C# Win Forms project and place several of
the
controls on a page everything is fine...all of the positioning properties
are correctly serialized to the designer code and the controls remain in
their designtime positions. HOWEVER if I import the custom control into VB
.Net win Forms project and follow EXACTLY the same procedure, then I save
the form and close it...when i open the form back up the controls have all
moved and it is also reflected in the designer code. If I repeat the
procedure again, they move again but a different amount.

I have triple checked all properties and even removed the set mutator to
no
avail.

Has anybody ever heard of this before? What can i do to troubleshoot this
problem?

Thanks for any info,
Ron

Hi,

Compare the code generated by the IDE in both cases, one thing you do
not mention though, is if the movement is inside your control or in
the form, or in other words the controls inside your control or your
control in the form
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top