how do you make an item on a menu become checked
so i can set this statement
if mnuoff (you enter the bit to make it checked) then
mciSendString "close background", 0, 0, 0
end if
cheers
Merlin ?
Printable View
how do you make an item on a menu become checked
so i can set this statement
if mnuoff (you enter the bit to make it checked) then
mciSendString "close background", 0, 0, 0
end if
cheers
Merlin ?
In the menu editor make sure that checked is checked for the menu in question. Then there is one simple statement.
mnuoff.checked = true
Make a mnu with the name of mnuClose and put the following code into it.
Code:Private Sub mnuClose_Click()
If Not mnuClose.Checked = True Then
mnuClose.Checked = True
mciSendString "close background", 0, 0, 0
Else
mnuClose.Checked = False
End If
End Sub
i still have a little problem
i need to be able to uncheck and check the same menu item
so if it is unchecked it stops the music and if it is checked then it will play the music
Cheers
Merlin ?
Try this code. I just modified my other code a bit to fit your needs. This one should work.
[Edited by Megatron on 05-21-2000 at 10:04 AM]Code:Private Sub mnuClose_Click()
If Not mnuClose.Checked = True Then
mnuClose.Checked = True
mciSendString "open C:\Mymidi.mid type sequencer alias background", 0, 0, 0
mciSendString "play background", 0, 0, 0
Else
mnuClose.Checked = False
mciSendString "close background", 0, 0, 0
End If
End Sub
thanks megatron it works the way it is ment to now
Merlin ?
By the way, if you already have your open statement in your Form's Initalize event you can just use play to play the music and pause to stop the music. Then when you want to End your program, use the close statement.
MEGATRON !!!
the midi plays but when it gets to the end it stops
how can i make the midi play all of the time until
the menu is unchecked
PLEASE HELP ME
Merlin ?