Results 1 to 7 of 7

Thread: [RESOLVED] MMcontrol question and guidance

  1. #1

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    217

    Resolved [RESOLVED] MMcontrol question and guidance

    I am trying use that control to record (which it does fine)
    But then I want to save that file

    What is the command \syntax to do this?

    also if you could give me guidance on all the other commands the control uses

    Stay Safe

    Jeff

  2. #2
    Hyperactive Member
    Join Date
    Aug 2017
    Posts
    380

    Re: MMcontrol question and guidance

    I assume you are talking about the Multimedia MCI Control. If so, then...

    Quote Originally Posted by habenero View Post
    But then I want to save that file

    What is the command \syntax to do this?
    I haven't tried this but according to the Command Property documentation, I believe it's "Save".

    Quote Originally Posted by habenero View Post
    also if you could give me guidance on all the other commands the control uses
    Check out MCI Commands.

  3. #3

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    217

    Re: MMcontrol question and guidance

    ok here is my code

    I want the filename in text2 to be the filename

    Now the file I open (jeff.wav) will save the recording - but the code doesnt write to the filename in the text box

    Again the code is clumsy but it did work at one time

    am using VB6 (sp6-xp pro OS)

    Private Sub cmd_save_Click()
    Form1.Caption = "Jeffs super duper audio recorder - with pause capabilities"
    Txt2_text.Enabled = True
    Txt2_text = Time
    Clipboard.Clear
    Text2.SetFocus
    MMControl1.FileName = "C:\Windows\Media\recordings XM" & (Text2.Text) & ".wav"
    MMControl1.Command = "Save"
    End Sub

  4. #4
    Hyperactive Member
    Join Date
    Aug 2017
    Posts
    380

    Re: MMcontrol question and guidance

    According to the documentation of the FileName Property:

    Quote Originally Posted by MSDN
    To change the FileName property at run time, you must close and reopen the Multimedia MCI control.

  5. #5

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    217

    Re: MMcontrol question and guidance

    ok will try that...thanks so much
    Jeff

  6. #6

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    217

    Re: MMcontrol question and guidance

    not quite sure where to open and put the close commands

    again the file is saved in the "windows\media" file but I cannot generate a new saved file

    here is my total code:

    Private Sub cmd_exit_Click()
    End
    End Sub

    Private Sub cmd_save_Click()
    Form1.Caption = "Jeffs super duper audio recorder - with pause capabilities"
    Txt2_text.Enabled = True
    Txt2_text = Time
    Clipboard.Clear
    Text2.SetFocus
    MMControl1.FileName = "C:\recordings XM" & (Text2.Text) & ".wav"
    MMControl1.Command = "Save"
    End Sub

    Private Sub Form_Load()
    MMControl1.Notify = False
    MMControl1.Wait = True
    MMControl1.Shareable = False
    MMControl1.RecordEnabled = True
    MMControl1.RecordMode = mciRecordOverwrite
    MMControl1.DeviceType = "WaveAudio"
    MMControl1.Command = "Pause"
    MMControl1.FileName = "C:\Windows\Media\jeff.wav"
    MMControl1.Command = "Open"
    Text1.Text = Time
    Txt2_text.Enabled = False
    Label3.Caption = " file location - c:\windows\media\jeff.wav"
    End Sub

    Private Sub MMControl1_PauseClick(Cancel As Integer)
    Form1.Caption = "paused"
    End Sub

    Private Sub MMControl1_RecordClick(Cancel As Integer)
    Form1.Caption = "Recording"
    End Sub


    I guess I can work around this whole thing - its more of saving a file in a new dir - and even I have done this 1000s of times
    Last edited by habenero; Jul 20th, 2020 at 05:44 PM.

  7. #7

    Thread Starter
    Addicted Member habenero's Avatar
    Join Date
    Aug 2015
    Posts
    217

    Re: MMcontrol question and guidance

    opening and closing the control didnt work

    figured out all by myself - works like a charm
    Last edited by habenero; Jul 21st, 2020 at 05:04 PM. Reason: additions

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