ChangeEventArgs to string

lalvarez

New member
Joined
Mar 20, 2013
Messages
4
Programming Experience
1-3
Hi,
I'm new in this forum. I don't know if this is the right place to post my question, but i'll try it anyway:

In a windows mobile application i have a procedure:
"Private Sub objGprs_Changed(ByVal sender As Object, ByVal args As Microsoft.WindowsMobile.Status.ChangeEventArgs) Handles objGprs.Changed"

and objGrps is:

Public WithEvents objGprs As Microsoft.WindowsMobile.Status.SystemState


I'm trying to guess which is the event that causes the change, so I think I should read "args" content, that is: i need to visualize the name of the event that is changing the SystemState.

How should i proceed?

Thanks in advance.
 
Have you read the documentation for the ChangeEventArgs class? That's the logical first step when you want to know anything about a class or member. It will tell you what members the class has and what they are for. Logic suggests that the class has a property that tells you what type of change occurred.
 
This class was new to me two minutes ago, but I looked it up in documentation, here's what I read from it: It appears a SystemState object is initialized for a specific system property, its CurrentValue property returns the current value, and Changed event notifies the new value in e.NewValue property when that property changes.
 
Finally I have discovered it's property "property" which gives the information about the property which has triggered this event. Thanks anyway!
 
That is true, if you have various SystemState objects that would raise the event you can get the object that raises the event from the event handlers sender property and check its Property property.
 
Back
Top