Hello
I am looking to determine when the connection type changes from 3G to GRPS for example and so am trying to use the ConnectionManager class and register for the Connected, Disconnected and ConnectionStateChanged events. This is so I can replicate the windows mobile taskbar and display which connection is active (HSDPA,3G, GPRS for example) with a symbol change.
I cannot get any of them to work when I run my application and close the 3G connection for example. I am testing on a HTC 6500, using mobile 6. The code I am using:
private
OpenNETCF.Net.ConnectionManager connMan = new ConnectionManager(); public Login_PageLoad()
{
connMan.Connected += new EventHandler(connMan_Connected);
connMan.Disconnected += new EventHandler(connMan_Disconnected);
connMan.ConnectionStateChanged += new EventHandler(connMan_OnConnectionStateChanged);
}
private
void connMan_OnConnectionStateChanged(object sender, EventArgs e)
{
label2.Text = "connection change";
}private void connMan_Connected(object sender, EventArgs e)
{
label2.Text = "connection connected";
}private void connMan_Disconnected(object sender, EventArgs e)
{
label2.Text = "connection disconnected";
}
Any help would be much appreciated
Many thanks