I am trying to stop a song in windows media player on the pocket pc and then
kill the application. So far I can kill the program with the following code
in C# but i have not figured out the stop method.
I was able to find the stop command for the PC with SPY++ but that doesnt
seem to apply to the Pocket PC. Any help would be great.
Thanks
Dan Tanzer
www.zerama.net
support@(NOSPAM)zerama.net
[DllImport("CoreDll")]
public static extern IntPtr FindWindow(char[] className, char[] windowName);
[DllImport("CoreDll")]
public static extern IntPtr PostMessage(IntPtr hWnd, int msg, int wParam,
int lParam);
IntPtr Hwnd=FindWindow(null, "Windows Media".ToCharArray());
//wm_user = 0x400;
//wmp_stop = 31756;
int x = 0x0400 + 31756;
PostMessage(Hwnd,0x0110/*WM_COMMAND*/,x,0);
PostMessage(Hwnd,0x0010/*WM_CLOSE*/,0,0);