Controls get misplaced in negative positions: are there ghosts ??

P

pamela fluente

I have a strange problem, I never see before.

I have a couple of controls (a label and a nyumericupdown) on a form
that periodically get misplaced
(i do not touch them).

I put them again in the right position but periodically they
disappear and when I look for them
i see they have some negative position:

Me.Label3.Location = New System.Drawing.Point(-869, -637)


This is getting me crazy. It happens only for those 2 controls. And
periodically.

What going on here? Are there some Java Ghost o similar ? :))

This happens even if one locks the controls. What's going on here ?

-P
 
R

rowe_newsgroups

  I have a strange problem, I never see before.

  I have a couple of controls (a label and a nyumericupdown) on a form
that periodically get misplaced
  (i do not touch them).

  I put them again in the right position but periodically they
disappear and when I look for them
  i see they have some negative position:

  Me.Label3.Location = New System.Drawing.Point(-869, -637)

  This is getting me crazy. It happens only for those 2 controls. And
periodically.

  What going on here?  Are there some Java Ghost o similar ?    :))

  This happens even if one locks the controls. What's going on here ?

-P

Must be ghosts :)

One thing to check - do the controls have an Anchor set? If so, is it
anything that might cause them to be forced offscreen on a form resize
or anything? Also, what happens if you delete and recreate the
controls?

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
 
L

Lloyd Sheen

I have a strange problem, I never see before.

I have a couple of controls (a label and a nyumericupdown) on a form
that periodically get misplaced
(i do not touch them).

I put them again in the right position but periodically they
disappear and when I look for them
i see they have some negative position:

Me.Label3.Location = New System.Drawing.Point(-869, -637)

This is getting me crazy. It happens only for those 2 controls. And
periodically.

What going on here? Are there some Java Ghost o similar ? :))

This happens even if one locks the controls. What's going on here ?

-P

Must be ghosts :)

One thing to check - do the controls have an Anchor set? If so, is it
anything that might cause them to be forced offscreen on a form resize
or anything? Also, what happens if you delete and recreate the
controls?

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/

Which version of VS. I remember I had alot of that kind of trouble but that
was with VS 2002/3

LS
 
P

pamela fluente

Must be ghosts :)

One thing to check - do the controls have an Anchor set? If so, is it
anything that might cause them to be forced offscreen on a form resize
or anything? Also, what happens if you delete and recreate the
controls?

Thanks,

Seth Rowe [MVP]http://sethrowe.blogspot.com/- Nascondi testo citato

- Mostra testo citato -

Thank you Seth,

yes that was my first attempt. To mess with the anchor properties.

But it's not related to that, because the problem reappers with
any setting. And even with controls locked.

This is really strange because it happens sistematically, always
with the same controls.

I really do not know. Seems something perhaps related with the
presence of a TabControl.

All the controls with this problems are on a tab page of a tab
control.

It's really misterious... and very annoying.


Anybody has ever seen that ?


-P
 
L

Lloyd Sheen

Must be ghosts :)

One thing to check - do the controls have an Anchor set? If so, is it
anything that might cause them to be forced offscreen on a form resize
or anything? Also, what happens if you delete and recreate the
controls?

Thanks,

Seth Rowe [MVP]http://sethrowe.blogspot.com/- Nascondi testo citato

- Mostra testo citato -

Thank you Seth,

yes that was my first attempt. To mess with the anchor properties.

But it's not related to that, because the problem reappers with
any setting. And even with controls locked.

This is really strange because it happens sistematically, always
with the same controls.

I really do not know. Seems something perhaps related with the
presence of a TabControl.

All the controls with this problems are on a tab page of a tab
control.

It's really misterious... and very annoying.


Anybody has ever seen that ?


-P


Are you trying to dock items in a tabpage. I have had that problem since VS
2008. I had to take the designer code out and put in code in the load of
the form. I don't know why the difference but that was my solution. The
problem is on Connect but no resolution.

LS
 
P

pamela fluente

  Thank you Seth,

    yes that was my first attempt. To mess with the anchor properties..

    But it's not related to that, because the problem reappers with
any setting. And even with controls locked.

   This is really strange because it happens sistematically, always
with the same controls.

   I really do not know. Seems something perhaps related with the
presence of a TabControl.

  All the controls with this problems are on a tab page of a tab
control.

  It's really misterious... and very annoying.

  Anybody has ever seen that ?

-P

Are you trying to dock items in a tabpage.  I have had that problem since VS
2008.  I had to take the designer code out and put in code in the load of
the form.  I don't know why the difference but that was my solution.  The
problem is on Connect but no resolution.

LS- Nascondi testo citato

- Mostra testo citato -


Hmmm

A bug? I hope they are able to fix it. Actually it's probablly even
difficult to reproduce.

I have a suspect that it appears when you make a custom control with a
tabcontrol.

Then you use that custom control on a form. When you place controls on
the custom control
(which is already on the form) it's like the Designer lose track of
their position.

Perhaps the presence of the custom control and the fact that the new
controls are dragged on this one
prevent the Designer from a correct computation of the control
position.


Just an attempt ... The other explanation is that the ghosts of the
dead java language want to make our
life more complicate playing tricks ! :)))

-P
 

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