That didn't work, but this did, well sorta.
extApplication = System.Diagnostics.Process.Start("C:\Program Files\Winamp\winamp.exe")
WinAmp.AppendFileToPlaylist("http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=6390&file=filename.pls")
WinAmp.Play()
I used your code to opne WinAmp, then I used an Active control bundled with Winamp to control it.
I was unable to use the ActiveX control before. ( I didn't have a handle )
The problem now is that the voice activation program is normally minimized. This only seems to work if the program is maximized.
I tried this:
WinAmp = System.Diagnostics.Process.Start("C:\Program Files\Winamp\winamp.exe")
WinAmp.AppendFileToPlaylist("http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=6390&file=filename.pls")
WinAmp.Play()
But no good...
OK Wait, this works... It's ugly, but it works...
Select Case strGenre
Case "jazz"
Me.WindowState = System.Windows.Forms.FormWindowState.Normal
Me.ShowInTaskbar = True
extApplication = System.Diagnostics.Process.Start("C:\Program Files\Winamp\winamp.exe")
WinAmp.AppendFileToPlaylist("http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=6390&file=filename.pls")
WinAmp.Play()
Me.WindowState = System.Windows.Forms.FormWindowState.Minimized
Me.ShowInTaskbar = False
This obviously sets the window to normal, momentarily, then does it's task, then minimizes again.
The strange thing is, that to stop the music playing, does not require me to do this.
Now I need to be able to change stations.
How would I check if extApplication has any value?
I tried:
If extApplication <> 0 Then
' do events
End if
and
If extApplication <> "" Then
' do events
End if
But of course extApplication is neither a string nor integer so an error was produced.
I tried
extApplication.kill()
' then open winamp
but that didn't open anything.
Wait,,, what am I stupid...
A regular boolean variable....
I'll get back to you.