locked
Using a change event with CellularSystemAvailableGprs property RRS feed

  • Question

  • I am trying to make a notifications class that monitors the various connection options available on a mobile device.  I had been monitoring the SystemProperty ConnectionsCount but after some digging I was able to find a CellularSystemAvailableGprs property.

    My question is how can I monitor Microsoft.WindowsMobile.Status.SystemState.CellularSystemAvailableGprs and raise an event when it changes?

    The odd thing is the property isn't listed when viewing through object explorer but I can access it when using my immediate window through the visual studio debugger.  It seems that the property is only available at run time and not at design time.  This really confuses me because I would love to use the property.

    Any explanation that someone could give me in regards to this oddity would be helpful.

    Darren
    Tuesday, December 16, 2008 5:02 PM

Answers

  • I don't know if this is a problem with Visual Studio or you specific environment however I think you can safely use CellularSystemAvailableGprs inside your code. This is in fact some value inside the registry that is monitored by your application (SystemState class). All other properties inside SystemState are implemented in the same way. So there should be no difference at runtime.
    • Marked as answer by warrentang Thursday, January 22, 2009 6:45 AM
    Tuesday, December 16, 2008 5:34 PM

All replies

  • I don't know if this is a problem with Visual Studio or you specific environment however I think you can safely use CellularSystemAvailableGprs inside your code. This is in fact some value inside the registry that is monitored by your application (SystemState class). All other properties inside SystemState are implemented in the same way. So there should be no difference at runtime.
    • Marked as answer by warrentang Thursday, January 22, 2009 6:45 AM
    Tuesday, December 16, 2008 5:34 PM
  • I have done some more poke around and it seems like it is a difference between a windows mobile 5 project and a windows mobile 6 project.  What I don't really understand is why the calls work at run time in a windows mobile 5 project but only show up design time in a windows mobile 6 project.
    Tuesday, December 16, 2008 7:55 PM