By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,028 Members | 1,108 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,028 IT Pros & Developers. It's quick & easy.

Custom controls moving around in VB .Net not C#

P: n/a
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

Jun 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On May 29, 3:11*pm, "Ron" <rs_herh...@yahoo.comwrote:
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
Jun 27 '08 #2

P: n/a
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
"Ignacio Machin ( .NET/ C# MVP )" <ig************@gmail.comwrote in
message
news:3c**********************************@p39g2000 prm.googlegroups.com...
On May 29, 3:11 pm, "Ron" <rs_herh...@yahoo.comwrote:
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

Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.