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);

Re: Can't Stop Windows Media Player with SendMessage by Ginny

Ginny
Thu Dec 11 13:34:58 CST 2003

Dan,

I think Chris answered your question on the MVP Chat, but if it wasn't your
question, there is a version of Spy++ for the PPC that comes with eVC++.
--
Ginny Caughey
.Net Compact Framework MVP

"Dan Tanzer" <dantanzerNOSPAM@zerama.net> wrote in message
news:em0MLcBwDHA.1060@TK2MSFTNGP12.phx.gbl...
> 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);
>
>
>
>
>
>



Re: Can't Stop Windows Media Player with SendMessage by Dan

Dan
Thu Dec 11 14:21:46 CST 2003

Ginny.
I am downloading eVC++4.0 as we speak. Thanks for the help.
I look foward to reading the transcript of todays chat, i missed the whole
thing because of my isp. arrrgggg.

If i dont get anywhere i'll post again or if anyone has the answer let me
know.

Dan
"Ginny Caughey [MVP]" <ginny.caughey.online@wasteworks.com> wrote in message
news:O6kDf3BwDHA.1512@TK2MSFTNGP10.phx.gbl...
> Dan,
>
> I think Chris answered your question on the MVP Chat, but if it wasn't
your
> question, there is a version of Spy++ for the PPC that comes with eVC++.
> --
> Ginny Caughey
> .Net Compact Framework MVP
>
> "Dan Tanzer" <dantanzerNOSPAM@zerama.net> wrote in message
> news:em0MLcBwDHA.1060@TK2MSFTNGP12.phx.gbl...
> > 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);
> >
> >
> >
> >
> >
> >
>
>