Guest dionisys Posted December 12, 2008 Report Posted December 12, 2008 (edited) Hey guys, I hope someone can help me, i'm searching for a tool which automaticly start the musicplayer, when i connect the headset to the phone. Is there a tool or something? I think it shouldnt be so hard to programm. Maybe someone can help, please. Thanks! I found the hard part of the code: Imports Microsoft.WindowsMobile.Status Public Class EventCatch Dim headsetState As SystemState Public Sub HeadsetForm() InitializeComponent() headsetState = New SystemState(SystemProperty.HeadsetPresent) headsetState.Changed = New ChangeEventHandler(headsetState_Changed) End Sub Sub headsetState_Changed(ByVal sender As Object, ByVal args As ChangeEventArgs) Dim gotHeadset As Boolean = Convert.ToBoolean(args.NewValue) If gotHeadset Then MessageBox.Show("Headset Present") Else MessageBox.Show("No Headset") End If End Sub End Class Edited December 12, 2008 by dionisys
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now