[Windows Mobile Software Development] JVH3:
Code to launch HTC Volume Control

I now can programatically launch the HTC Volume Control.

[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Linq;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Collections.Generic;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.ComponentModel;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Data;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Drawing;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Text;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Windows.Forms;[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]using[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] System.Runtime.InteropServices;[/SIZE]

[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]namespace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] LaunchVolumeControl[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]partial[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]class[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Form1[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] : [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Form[/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]{[/SIZE]
[SIZE=2][[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]DllImport[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"coredll.dll"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])][/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]internal[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]extern[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]IntPtr[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] FindWindow([/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]String[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] lpClassName, [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]String[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] lpWindowName);[/SIZE]
[SIZE=2][[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]DllImport[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"coredll.dll"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])][/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]static[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]extern[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] SendMessage([/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]IntPtr[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] hWnd, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] msg, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] wParam, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] lParam);[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Form1()[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]InitializeComponent();[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]private[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] button4_Click([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]object[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] sender, [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]EventArgs[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] e)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]IntPtr[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] hWnd = FindWindow([/SIZE][SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]"HHTaskBar"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2], [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]null[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] LParam = ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])MakeLParam(240, 40);[/SIZE]
[SIZE=2]LParam = 0x1A01BE;[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]WMessages[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].WM_LBUTTONDOWN, 0, LParam);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])[/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]WMessages[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].WM_LBUTTONUP, 0, LParam);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])0x800c, 3, 0);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])0x498, 2, 0);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])0x407, 0x7c08d760, 0x0A);[/SIZE]
[SIZE=2]SendMessage(hWnd, ([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])0x007, 0, 0);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]enum[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]WMessages[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] : [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]uint[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2]{ [/SIZE]
[SIZE=2]WM_LBUTTONDOWN = 0x201, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Left mousebutton down [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_LBUTTONUP = 0x202, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Left mousebutton up [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_LBUTTONDBLCLK = 0x203, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Left mousebutton doubleclick [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_RBUTTONDOWN = 0x204, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Right mousebutton down [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_RBUTTONUP = 0x205, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Right mousebutton up [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_RBUTTONDBLCLK = 0x206, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Right mousebutton doubleclick [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_KEYDOWN = 0x100, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Key down [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]WM_KEYUP = 0x101, [/SIZE][SIZE=2][COLOR=#008000][SIZE=2][COLOR=#008000]//Key up [/COLOR][/SIZE]
[/COLOR][/SIZE][SIZE=2]} [/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] MakeLParam([/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] LoWord, [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] HiWord) [/SIZE]
[SIZE=2]{ [/SIZE]
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ((HiWord << 16) | (LoWord & 0xffff)); [/SIZE]
[SIZE=2]} [/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE]

I found the remaining 4 by using remote spy. Great advice. I did that and actually figured it out before reading your last post though.

Remote Spy ultimately got me on the right track along with getting the window and sending it messages.

Such a great tool.

Thank you for your help.

It's almost 3am where I live, so I am going to get some sleep now.