VS 2003 Designer bug? -- Duplicate declaration error

  • Thread starter Deanna Delapasse
  • Start date
D

Deanna Delapasse

Hi,

I have a very simple custom control (just a button with a bitmap
background). Sometimes when I add several of the controls to a form and run
the app the last one or two controls appear to lose their properties and are
redrawn blank at the top left of the form. I finally noticed that when this
happens there's an item in the task list that says : "Duplicate declaration
of member 'Font'", though the build is successful. The app runs fine (all
controls in their proper place) and the .cs file is fine. It's just that
the designer goes a little crazy.

I've found several posts about this (mostly the same message, but
sometimes with member 'Location' or 'Size'), but most people think it was
just a problem with an early version of Visual Studio 2003. I've got the
June 2004 version and don't have a clue what I can do to solve this. I'd
appreciate any help! Especially if someone from MS could look up the error
message. I tried msdn, but don't find it.

To attempt to recreate copy several of the same custom control onto a
form. I can usually make the bug occur when I copy/paste 12-15 instances of
the control.

Please help!
thanks,
Deanna
 
D

Deanna Delapasse

Just so people who have this problem will know I FINALLY found a
work-around. If I delete the lines describing the control that was moved to
the top left corner from the .resx file and then reopen the form in the
designer everything is ok. BIZARRE!
 

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

Similar Threads


Top