I have a custom class which basically manages the program settings.
In it's New() event, I'm performing a check to see whether a value stored in My.Settings is the same as the default value (I made sure the value wasn't!), if not then it will perform a RaiseEvent ValueChanged().
On my form, I have an instance of the class declared "Private Withevents ProgramSettings as New clsProgramSettings", I also have a handler "Private Sub DoSomething() Handles ProgramSettings.ValueChanged" declared.
When I run the program the form gets loaded, the instance is created, the RaiseEvent is called, but the handler is not receiving the event?
I tried "Private Withevents ProgramSettings as clsProgramSettings", then creating the instance in the Form.Load(), but still no success!?
Is there something I'm doing wrong, or is there a problem with the IDE? I'm using VS 2010.
Any help would be greatly appreciated.
Thanks.
In it's New() event, I'm performing a check to see whether a value stored in My.Settings is the same as the default value (I made sure the value wasn't!), if not then it will perform a RaiseEvent ValueChanged().
On my form, I have an instance of the class declared "Private Withevents ProgramSettings as New clsProgramSettings", I also have a handler "Private Sub DoSomething() Handles ProgramSettings.ValueChanged" declared.
When I run the program the form gets loaded, the instance is created, the RaiseEvent is called, but the handler is not receiving the event?
I tried "Private Withevents ProgramSettings as clsProgramSettings", then creating the instance in the Form.Load(), but still no success!?
Is there something I'm doing wrong, or is there a problem with the IDE? I'm using VS 2010.
Any help would be greatly appreciated.
Thanks.
Last edited: