-
Jul 20th, 2020, 01:18 PM
#1
Thread Starter
Addicted Member
[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
-
Jul 20th, 2020, 02:28 PM
#2
Re: MMcontrol question and guidance
I assume you are talking about the Multimedia MCI Control. If so, then...
Originally Posted by habenero
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".
Originally Posted by habenero
also if you could give me guidance on all the other commands the control uses
Check out MCI Commands.
-
Jul 20th, 2020, 02:41 PM
#3
Thread Starter
Addicted Member
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
-
Jul 20th, 2020, 03:05 PM
#4
Re: MMcontrol question and guidance
According to the documentation of the FileName Property:
Originally Posted by MSDN
To change the FileName property at run time, you must close and reopen the Multimedia MCI control.
-
Jul 20th, 2020, 03:48 PM
#5
Thread Starter
Addicted Member
Re: MMcontrol question and guidance
ok will try that...thanks so much
Jeff
-
Jul 20th, 2020, 05:06 PM
#6
Thread Starter
Addicted Member
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.
-
Jul 21st, 2020, 02:58 PM
#7
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|