Z
ZikO
Hi.
I appologise for noob problems but I don't know what Im doing wrong.
Yesterday I descibed a strange behavoiur of VB, as transparency doesn't work
for all the time the program work. It work only when I run prog.
Today I found another thing. I have music in background and use
WindwosMediaPlayer. The code is:
Dim WithEvents MusicPlayer As New WMPLib.WindowsMediaPlayer
....
Private Sub FormMain_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
MusicPlayer.URL = "Sounds\TitleSong.mp3"
MusicPlayer.settings.volume = 64
MusicPlayer.settings.playCount = 999
MusicPlayer.settings.mute = False
MusicPlayer.controls.stop()
End Sub
In module:
Friend mf As New FormMain
Friend pf As New PictureForm
and I use Hide and Show method to open and close forms.
I switch music on off by a button. When I open another form (i dont hide
mainform) and come back to mainform I can't switch music off. Instead I
switch on another instance of music, so 2 copies of the same song play
together. BUT If I have music off and open another form, come back to main
then everything work properly onwards, until the end of prog.
Can someone help me. By Thursday I need to submit it. I have been using VB
only for 4 months and I can't manage it.
Thanks so much.
Regards.
I appologise for noob problems but I don't know what Im doing wrong.
Yesterday I descibed a strange behavoiur of VB, as transparency doesn't work
for all the time the program work. It work only when I run prog.
Today I found another thing. I have music in background and use
WindwosMediaPlayer. The code is:
Dim WithEvents MusicPlayer As New WMPLib.WindowsMediaPlayer
....
Private Sub FormMain_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
MusicPlayer.URL = "Sounds\TitleSong.mp3"
MusicPlayer.settings.volume = 64
MusicPlayer.settings.playCount = 999
MusicPlayer.settings.mute = False
MusicPlayer.controls.stop()
End Sub
In module:
Friend mf As New FormMain
Friend pf As New PictureForm
and I use Hide and Show method to open and close forms.
I switch music on off by a button. When I open another form (i dont hide
mainform) and come back to mainform I can't switch music off. Instead I
switch on another instance of music, so 2 copies of the same song play
together. BUT If I have music off and open another form, come back to main
then everything work properly onwards, until the end of prog.
Can someone help me. By Thursday I need to submit it. I have been using VB
only for 4 months and I can't manage it.
Thanks so much.
Regards.