Re: Usercontrol changes doesn't compile?

Tech-Archive recommends: Speed Up your PC by fixing your registry



On Tue, 07 Aug 2007 18:00:48 +0200, Johnny Jörgensen <jojo@xxxxxxxxx> wrote:

I've got a usercontrol derived from a normal ComboBox that contains some
special formatting code. On my main form I've got a lot of my custom
comboboxes.

I discovered a bug in the derived control and fixed it. But it still doesn't
work for the controls already added to the form. It works fine for new
instances of the control dragged from the toolbox to the form.

I don't want to have to drag and drop new controls to exchange all my old
controls - that is a sure way to introduce errors...

No matter what I do, I cannot update the old controls. I've tried changing
them in the designer file to regular ComboBoxes and back to my derived
combobox - Doesn't work.

I've tried removing the reference to the project in which the component is
located and readding it - Doesn't work. I've tried adding the new code
alongside the old code under a different classname and renaming the old
controls' class to the new controls' class in the designer file - Doesn't
work.

I'm lost now - have no more ideas! Why the h*** does it have to be that
hard?

/Johnny J.




Hi Johnny,

How are the Form and the UserControl related? Are they in the same project? If so, usually a recompile should be sufficient, though you may need to close and reopen the designer view to have it update itself. If you are referensing an external assembly make sure the referense is updated. Check if the new assembly is copied locally if needed, and maybe delete and recreate the referense.

--
Happy coding!
Morten Wennevik [C# MVP]
.



Relevant Pages

  • Re: Forms Inheritance and its baggage!
    ... operation for comboBoxes are not compatible. ... runtime attributes need to be forced-in at the design time. ... Controls, including Forms. ... Firstly one has to presume that some controls on the base Form will be ...
    (microsoft.public.vsnet.general)
  • Limitation to combobox items
    ... I'm working on a database interface that will use comboboxes and datagrids ... My second question is about the controls that come with VB .Net in general: ... I stop trying to make them work and start shopping for a third party suite ...
    (microsoft.public.dotnet.framework.windowsforms.databinding)
  • Edit control height after font change
    ... The problem I have is that comboboxes resizes themselves after font changing, modifying their height in order to contain text with the new font, and that is fine. ... TextBox controls, instead, don't resize themselves; I can resize their height, but I dont't know exactly which new value I should use. ...
    (microsoft.public.vc.mfc)
  • RE: Inheriting from DataGridTextBoxColumn and CancelEdit
    ... make a column with comboboxes. ... data binding listens for propertyChanged events for each property ... to which our controls are bound. ... controls bound to that object are refreshed. ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: Userform for time entry: multiple controls/single value?
    ... I will assume the comboboxes are ComboBox1 ... Start by showing your form design in the VBA editor. ... You need to put the code in between the Private Sub line and the End Sub ... I made the userform with the controls laid out, ...
    (microsoft.public.excel.programming)