I think, by "remotely" you mean to control WMP by a foreign application, on the same computer.
If so, you may try the following code. You need to place four command buttons on the form.
___
[tt]
Private Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (ByVal lpString As String) As Long
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Enum PlayCommands
cmdNext = &HB0000
cmdPrevious = &HC0000
cmdStop = &HD0000
cmdPlayPause = &HE0000
End Enum
Private Sub Form_Load()
Command1.Caption = "Previous"
Command2.Caption = "Play/Pause"
Command3.Caption = "Stop"
Command4.Caption = "Next"
End Sub
Private Sub Command1_Click()
ExecuteCommand cmdPrevious
End Sub
Private Sub Command2_Click()
ExecuteCommand cmdPlayPause
End Sub
Private Sub Command3_Click()
ExecuteCommand cmdStop
End Sub
Private Sub Command4_Click()
ExecuteCommand cmdNext
End Sub
Public Sub ExecuteCommand(cmd As PlayCommands)
Static ShellHookMessage As Long
If ShellHookMessage = 0 Then _
ShellHookMessage = RegisterWindowMessage("SHELLHOOK")
PostMessage -1, ShellHookMessage, 12, cmd 'broadcast
End Sub[/tt]
____
Note that a registered window message "SHELLHOOK" is being broadcasted to control Windows Media Player. This message is broadcasted when you press the "playback" control keys on the keyboard. Here the pressing of these keys is simulated using code. The message is broadcasted for all windows on the system. So other applications may also respond to these commands that are generated from your app.
If you want to control WMP specifically, you should grab the WMP window handle using FindWindow function (Class=WMPlayerApp, Title=Windows Media Player) and target all the messages directly to that window.