Results 1 to 5 of 5

Thread: [RESOLVED] I need help on deactivating the playing of wav file

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Posts
    178

    Resolved [RESOLVED] I need help on deactivating the playing of wav file

    I need help for deactivating the playing of .wav file, if the frmBluekey.MinutesCounter.Enabled = False then it will not play the .wav file but still Check1.Value still have an option to play or not the .wav file

    VB Code:
    1. Private Sub mnuManual_Click()
    2. Dim mypath As String
    3. Dim mystr As String
    4.  
    5. If frmBluekey.MinutesCounter.Enabled = False Then
    6. mypath = "C:\logs\" 'set your own path in here, remember th last \
    7. mystr = "Bluekey Manual" & "-" & Format(Now, "mmmmddyyyy-hh-nn-ss") & ".txt"
    8. Open mypath & mystr For Output As 1
    9.  Print #1, "Report - Manual Opening """
    10. Close 1
    11.  Out &H378, 1  ' output decimal to printerport 1000 0000
    12.  For Y = 1 To 10000000 ' loop for your delay
    13.  Next Y
    14.  Out &H378, 0 ' output decimal to printerport 0000 0000
    15.  Else
    16.  msg = MsgBox("Please run the Bluekey [Start Monitoring", vbOKOnly, "Attention")
    17. End If
    18. End Sub

    VB Code:
    1. If frmBluekey.Check1.Value = 1 Then
    2. Call PlayWave("D:\Bluekey\voice.wav", False)
    3. Else
    4. frmBluekey.Check1.Value = 0
    5. endif
    Last edited by lord_cedrich; Aug 10th, 2006 at 04:42 AM.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Posts
    178

    Re: I need help on deactivating the playing of wav file

    i hope somebody could help me

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: I need help on deactivating the playing of wav file

    so if it is already playing wave sound you want it to stop or pause?
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Posts
    178

    Re: I need help on deactivating the playing of wav file

    i need to stop the playing of the wav file in default, but if frmBluekey.MinutesCounter.Enabled = False it will play the wav file
    frmBluekey.MinutesCounter.Enabled = true it will not play the wav file

    but still Check1.Value still have an option to play or not the .wav file

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Apr 2006
    Posts
    178

    Re: I need help on deactivating the playing of wav file

    Thanks a lot i resolved my problems than you very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width