-
November 9th, 2009, 12:09 AM
#1
[RESOLVED] Opening Video File using MMControl in vb
Can anybody tell me .How should i open Video file MPG/MPEG/BUP Using MMControl.i simple want to open a video file Using Bt_Open Button.and simple want to play Using Bt_Play Button.But the following Code is Not Working.
Code:
Private Sub Bt_Play_Click()
MMControl1.Wait = True
MMControl1.Command = "Play"
End Sub
Private Sub BtOpen_Click()
CommonDialog1.ShowOpen
MMControl1.FileName = CommonDialog1.FileName
MMControl1.Wait = True
MMControl1.Command = "Open"
End Sub
-
November 9th, 2009, 08:20 PM
#2
Re: Opening Video File using MMControl in vb
Add this, to see if you have a valid path. What is the extension of the file?
Code:
Private Sub BtOpen_Click()
CommonDialog1.ShowOpen
MMControl1.FileName = CommonDialog1.FileName
debug.print MMControl1.FileName
MMControl1.Wait = True
MMControl1.Command = "Open"
End Sub
-
November 9th, 2009, 11:40 PM
#3
Re: Opening Video File using MMControl in vb
Still Not Working .here is the following code .What i have written.Kindly let me know the Idea.
Any help would be highly appreciated.right now i am trying to open *.Wav file.
Code:
Private Sub Bt_Play_Click()
MMControl1.Wait = True
MMControl1.Command = "Play"
End Sub
Private Sub BtOpen_Click()
CommonDialog1.ShowOpen
MMControl1.FileName = CommonDialog1.FileName
Debug.Print MMControl1.FileName
MMControl1.Wait = True
MMControl1.Command = "Open"
End Sub
Private Sub Form_Load()
Form1.Caption = MMControl1.FileName
End Sub
Last edited by firoz.raj; November 9th, 2009 at 11:50 PM.
-
November 9th, 2009, 11:42 PM
#4
Re: Opening Video File using MMControl in vb
There is no control in the Form_Load code. Post the value of the DEBUG.PRINT statement that I asked for before
-
November 10th, 2009, 06:47 PM
#5
Re: Opening Video File using MMControl in vb
Take a look at this:
Code:
Option Explicit
' cdlCFPrinterFonts &H2
' Save File Options
'&H2 - Forces a warning before overwriting a file
'&H8 - Stops default directory from changing
'&H200 - more than one file can be selected.
'&H1000 - This makes it so the file must exist.
'&H2000 - This warns the user before creating a new file.
Private Sub cmdOpen_Click()
' CancelError is True.
On Error GoTo ErrHandler
CommonDialog1.InitDir = App.Path
' Set Flags
CommonDialog1.Flags = cdlOFNAllowMultiselect Or cdlOFNLongNames
' Set filters.
CommonDialog1.Filter = "All Files (*.*)|*.*|Text" & _
"Files (*.txt)|*.txt|Batch Files (*.bat)|*.bat"
' CommonDialog1.Filter = "AutoForm Files (*.doc) (*.rtf)|*.doc;*.rtf|All " & _
"Files (*.*)|*.*"
' Specify default filter.
CommonDialog1.FilterIndex = 2 ' Default to TEXT
' Display the Open dialog box.
CommonDialog1.ShowOpen
' Call the open file procedure.
' OpenFile (CommonDialog1.FileName)
Debug.Print CommonDialog1.FileName
Exit Sub
ErrHandler:
' User pressed Cancel button.
Exit Sub
End Sub
Private Sub cmdShowColor_Click()
' Set Cancel to True
CommonDialog1.CancelError = True
On Error GoTo ErrHandler
' Set the Flags property
CommonDialog1.Flags = cdlCFEffects Or cdlCFBoth
' Display the Font dialog box
CommonDialog1.ShowColor
rtb.BackColor = CommonDialog1.Color
Exit Sub
ErrHandler:
' User pressed the Cancel button
Exit Sub
End Sub
Private Sub cmdShowFont_Click()
' Set Cancel to True
CommonDialog1.CancelError = True
On Error GoTo ErrHandler
' Set the Flags property
CommonDialog1.Flags = cdlCFEffects Or cdlCFBoth ' cdlCFPrinterFonts
' Display the Font dialog box
CommonDialog1.ShowFont
If rtb.SelLength = 0 Then
rtb.SelStart = 0
rtb.SelLength = Len(rtb.SelRTF)
End If
rtb.SelFontName = CommonDialog1.FontName
rtb.SelFontSize = CommonDialog1.FontSize
rtb.SelBold = CommonDialog1.FontBold
rtb.SelItalic = CommonDialog1.FontItalic
rtb.SelUnderline = CommonDialog1.FontUnderline
rtb.SelStrikeThru = CommonDialog1.FontStrikethru
rtb.SelColor = CommonDialog1.Color
Exit Sub
ErrHandler:
' User pressed the Cancel button
Exit Sub
End Sub
Private Sub cmdSaveFile_Click()
Dim strFileName As String
Dim ans As Integer
CommonDialog1.Flags = &H2 ' Overwrite Flag
CommonDialog1.Filter = "RTF|*.rtf|Text|*.txt"
CommonDialog1.ShowSave
On Error GoTo SaveProblems
strFileName = CommonDialog1.FileName
If CommonDialog1.FilterIndex = 1 Then
CommonDialog1.DefaultExt = "rtf"
rtb.SaveFile strFileName
Else
CommonDialog1.DefaultExt = "txt"
rtb.SaveFile strFileName, rtfText
End If
Exit Sub
SaveProblems:
MsgBox "Can’t save the file, try again.", vbCritical
Exit Sub
End Sub
Private Sub Form_Load()
Label1.Caption = "Open File into RTB " & vbCrLf & _
"Save File from RTB" & vbCrLf & _
"Show Font" & vbCrLf & _
"Change selected text" & vbCrLf & _
" or all text." & vbCrLf & _
"Show Color" & vbCrLf & _
"Change BackColor of RTB"
End Sub
Sub SaveMultipleFiles()
Dim strOrigDir As String
Dim strNewDir As String
Dim varTemp As Variant
Dim lngIdx As Long
strNewDir = "D:\Temp\"
With CommonDialog1
.Flags = cdlOFNAllowMultiselect Or cdlOFNLongNames Or cdlOFNExplorer
.ShowSave
varTemp = Split(.FileName, vbNullChar)
End With
If IsArray(varTemp) Then
If UBound(varTemp) = 0 Then
FileCopy varTemp(lngIdx), strNewDir & Right$(varTemp(lngIdx), Len(varTemp(lngIdx)) - InStrRev(varTemp(lngIdx), "\"))
Else
strOrigDir = varTemp(0)
For lngIdx = LBound(varTemp) + 1 To UBound(varTemp)
FileCopy strOrigDir & "\" & varTemp(lngIdx), strNewDir & varTemp(lngIdx)
Next
End If
End If
End Sub
-
November 16th, 2009, 03:48 AM
#6
Re: Opening Video File using MMControl in vb
Can you tell me Why *.bup Video File is Not working .Mpg/Mpeg/Mp3/WMV/WAV file is working.
But some other type of Audio File is Not Working.Kindly let me know the idea.
Code:
Private Sub Bt_Play_Click()
CommonDialog1.Filter = "VideoFile(*.mpg)|*.mpeg|ALL Files(*.*)|*.*"
CommonDialog1.ShowOpen
MMControl1.FileName = CommonDialog1.FileName
Debug.Print MMControl1.FileName
MMControl1.Wait = True
MMControl1.Command = "Open"
MMControl1.Command = "Prev"
MMControl1.Command = "PlAY"
End Sub
Private Sub Form_Load()
Form1.Caption = MMControl1.FileName
End Sub
-
November 16th, 2009, 08:20 PM
#7
Re: Opening Video File using MMControl in vb
Because it (and myself included) don't know what a BUP file is.
-
November 17th, 2009, 12:50 PM
#8
Re: Opening Video File using MMControl in vb
If wet don't know what kind of file it is, then how can the MM control? What program DOES open that kind of file? I guess you would have to give that to each person, if it's free to give away. (Most are NOT)
-
November 23rd, 2009, 04:38 AM
#9
Re: [RESOLVED] Opening Video File using MMControl in vb
dear,
A .BUP file is a file on a DVD = "Backup File of the IFO" (see Explorer)
I don't think MCC can open this.
br,
-
November 23rd, 2009, 07:33 PM
#10
Re: [RESOLVED] Opening Video File using MMControl in vb
Doesn't look like it needs to can be opened at all using the MM control:
http://www.fileinfo.com/extension/bup
-
November 24th, 2009, 01:08 AM
#11
Re: [RESOLVED] Opening Video File using MMControl in vb
One of the programs on the list
-
November 24th, 2009, 09:58 AM
#12
Re: [RESOLVED] Opening Video File using MMControl in vb
This is just a thought... BUT it may be you need the codecs for the extension in question. You might be able to search for the codec using your friends (yahoo, google, ask, answers, bing) or perhaps downloading and installing Media Player Classic. Then again, I could be barking up the wrong tree...
Good Luck
-
February 16th, 2010, 08:28 AM
#13
Re: [RESOLVED] Opening Video File using MMControl in vb
Just search the internet ( Google ) for mp4 codecs. There are also plenty mp4 to mp3 converters out there.
Are you sure this thread is resolved ¿
-
February 22nd, 2010, 05:11 AM
#14
Re: [RESOLVED] Opening Video File using MMControl in vb
Are you sure this thread is resolved ¿
Yes Now This thread is Resolved.
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
|