Public Sub ToggleButton_PlayStop_Click()
Debug ToggleButton_PlayStop.Value
If ToggleButton_PlayStop.Value = False Then
Try mp.Stop
If Error Then
Message.Error("error trying to stop the media player", "ok")
Stop Event
Endif
ToggleButton_PlayStop.Text = "PLAY"
ToggleButton_PlayStop.Picture = Stock["16/play"]
Else
Try mp.Start
If Error Then
Message.Error("Error trying to start media player!" & gb.crlf & "Please check if media URL is valid or other options.", "ok")
Stop Event
Endif
ToggleButton_PlayStop.Text = "STOP"
ToggleButton_PlayStop.Picture = Stock["16/stop"]
Endif
End
ma lo stato cambia comunque ..... suppongo perche' il cambio di stato sia precedente alla routine relativa al "click"
sposto il tutto in un mousedown?