M
Mark
Hi.
I searched for hours now but can't find how to get the following to work:
A usercontrol with two properties (A and B).
If A is changed in the designer, B should be changed as well.
This works but the change in B is not instantly reflected in the
designer, it's only shown if you click on B and then the new value is shown.
In VB6 this works by calling PropertyChanged "B".
In VB.NET 2.0 this also works using some INotifyPropertyChanged thing.
But how does it work with VB.NET 1.1?
I even wrote a VB6 app (where everything worked) and then used the
upgrade manager from VB.NET to convert the project. It renamed the
events but the changes are not reflected in the designer as it did in VB6.
The only thing remotely helpful I found is this page
http://www.interact-sw.co.uk/iangblog/2004/10/23/propertychange
which seems a bit too complicated for such an easy(?) problem.
Public Class UC
Inherits System.Windows.Forms.UserControl
Private m_A as integer
Private m_B as integer
Public Property A As Integer
Get
Return m_A
End Get
Set(ByVal Value As Integer)
m_A = Value
m_B = m_A
End Set
End Property
Public Property B As Integer
Get
Return m_B
End Get
Set(ByVal Value As Integer)
m_B = Value
End Set
End Property
end class
Any help would be greatly appreciated
Mark
I searched for hours now but can't find how to get the following to work:
A usercontrol with two properties (A and B).
If A is changed in the designer, B should be changed as well.
This works but the change in B is not instantly reflected in the
designer, it's only shown if you click on B and then the new value is shown.
In VB6 this works by calling PropertyChanged "B".
In VB.NET 2.0 this also works using some INotifyPropertyChanged thing.
But how does it work with VB.NET 1.1?
I even wrote a VB6 app (where everything worked) and then used the
upgrade manager from VB.NET to convert the project. It renamed the
events but the changes are not reflected in the designer as it did in VB6.
The only thing remotely helpful I found is this page
http://www.interact-sw.co.uk/iangblog/2004/10/23/propertychange
which seems a bit too complicated for such an easy(?) problem.
Public Class UC
Inherits System.Windows.Forms.UserControl
Private m_A as integer
Private m_B as integer
Public Property A As Integer
Get
Return m_A
End Get
Set(ByVal Value As Integer)
m_A = Value
m_B = m_A
End Set
End Property
Public Property B As Integer
Get
Return m_B
End Get
Set(ByVal Value As Integer)
m_B = Value
End Set
End Property
end class
Any help would be greatly appreciated
Mark