anoniem Geplaatst: 17 februari 2003 Delen Geplaatst: 17 februari 2003 Ok ik heb programmaatje dat video afspeeld, wil hem nu een .part bestand laten omzetten in een .mpg bestand en deze eers kpieren en dan afspelen Dit heb ik [code:1:419ee668e3] Private Sub Command1_Click() Dim bestandsnaam As String cdlKies.InitDir = "C:\" cdlKies.Filter = "Video|*.mpeg;*.mpg;*.avi;*.wmv|Alle bestanden|*.*" cdlKies.ShowOpen bestandsnaam = cdlKies.FileName msspeler.FileName = bestandsnaam End Sub Private Sub Command2_Click() msspeler.Height = 10000 msspeler.Width = 11000 End Sub Private Sub Command3_Click() msspeler.Height = 4815 msspeler.Width = 5295 End Sub Private Sub Command4_Click() formbreedte = Form1.Width formbreedte2 = formbreedte - 2500 formhoogte = Form1.Height formhoogte2 = formhoogte - 500 msspeler.Width = formbreedte2 msspeler.Height = formhoogte2 End Sub Private Sub Command5_Click() If txtVariabele.Text = 0 Then filFile.Visible = False txtVariabele.Text = 1 Exit Sub End If If txtVariabele.Text = 1 Then filFile.Visible = True txtVariabele.Text = 0 Exit Sub End If End Sub Private Sub Command6_Click() Dim oudebestandsnaam As String oudebestandsnaam = filTempfiles.FileName x = Shell("copy " + DirFolder.Path & "\" & filTempfiles.FileName + " c:\emule preview\temp\" + oudebestandsnaam$) adres = "c:\emule previeuw\temp" + oudebestandsnaam$ msspeler.FileName = adres End Sub Private Sub filFile_DblClick() 'Get the filename from the FileListBox control. adres = DirFolder.Path & "\" & filFile.FileName End Sub Private Sub Dirfolder_Change() 'Set the folder displayed in the FileListBox 'control to the user's selection. filFile.Path = DirFolder.Path filTempfiles.Path = DirFolder.Path End Sub Private Sub drvDrive_Change() 'Set the drive displayed in the DirListBox 'control to the user's selection. DirFolder.Path = drvDrive.Drive End Sub Private Sub filTempfiles_DblClick() adres = DirFolder.Path & "\" & filTempfiles.FileName End Sub Private Sub Form_Load() On Error GoTo Fault txtVariabele.Text = 0 DirFolder.Path = "d:\3dMark2001 SE\data\temp" drvDrive.Drive = "d:\" Exit Sub Fault: Select Case Err.Number 'Evaluate Error Number Case 76 DirFolder.Path = "c:\" drvDrive.Drive = "c:\" Case Else MsgBox "Er klopt iets niet" End Select End Sub [/code:1:419ee668e3] Helaas blijkt de copy niet te werken en het hernoemen heb ik nog niet maar dat is niet noodzakelijk voor windowsmediaplayer Quote Link naar reactie
anoniem Geplaatst: 17 februari 2003 Auteur Delen Geplaatst: 17 februari 2003 kun je niet even een stukje code posten en proberen aan te geven waar het misgaat. Het is nl niet erg interressant om lappen code door te spitten. Quote Link naar reactie
anoniem Geplaatst: 18 februari 2003 Auteur Delen Geplaatst: 18 februari 2003 Denk je er wel aan dat je geen spaties in je padnaam mag hebben als je dit onder win9x probeert en dat je dan te maken hebt met een 8.3 beperking in je padnaam? (Dus geen 'emule preview' maar emule~1 oid.) Quote Link naar reactie
anoniem Geplaatst: 18 februari 2003 Auteur Delen Geplaatst: 18 februari 2003 //@laurens DAt kan best... //@TDP Copy is alleen geen geldige opdracht :) Ideetje: maak een bestand 'copy.bat' aan en zet het in die werkdir met de volgende inhoud: [code:1:8711fcc52f]@echo off copy %1 %2 %3 %4 %5 %6 %7 %8 %9 [/code:1:8711fcc52f] dan zal het wel werken :) Quote Link naar reactie
anoniem Geplaatst: 18 februari 2003 Auteur Delen Geplaatst: 18 februari 2003 Hij gaf idd de fout bij het copy stukje, maar moet toch wel moglijk zijn om te kopeiren met vb?? Een bat bestand maken zie je gebeuren en dat is niet fijn, zeker als je ecen snel een preview wilt bekijken. Is er iemadn die weet hoe je wel goed lunt koperien (zal ook ff kijken of het idd aan de spatie lag) Quote Link naar reactie
anoniem Geplaatst: 18 februari 2003 Auteur Delen Geplaatst: 18 februari 2003 filecopy source,destination Quote Link naar reactie
anoniem Geplaatst: 18 februari 2003 Auteur Delen Geplaatst: 18 februari 2003 thanks m8 Quote Link naar reactie
anoniem Geplaatst: 19 februari 2003 Auteur Delen Geplaatst: 19 februari 2003 [quote:b647a25710="sdk"] [code:1:b647a25710] x = Shell("copy " + DirFolder.Path & "\" & filTempfiles.FileName + " c:\emule preview\temp\" + oudebestandsnaam$) [/code:1:b647a25710] [/quote:b647a25710] [code:1:b647a25710] Declare Function CopyFileA Lib "kernel32" Alias "CopyFileA" ( _ ByVal lpExistingFileName As String, _ ByVal lpNewFileName As String, _ ByVal bFailIfExists As Long) As Long public function CopyFile(byval SourceFileName as string, _ byval TargetFileName as string, _ byval FailIfTargetExists as Boolean) as Boolean Err.Clear CopyFile = CopyFileA(SourceFileName,TargetFileName,clng(FailifTargetExists)) ) then if (not CopyFile) then Call MsgBox(Err.Description) endif end function [/code:1:b647a25710] Aanroep: [code:1:b647a25710] CopyFile("c:\temp\bron.avi","c:\temp\destination.avi",True) [/code:1:b647a25710] Quote Link naar reactie
anoniem Geplaatst: 19 februari 2003 Auteur Delen Geplaatst: 19 februari 2003 laat hem eerst maar eens met de basis beginnen :) Quote Link naar reactie
anoniem Geplaatst: 19 februari 2003 Auteur Delen Geplaatst: 19 februari 2003 Ik heb al iets dat werkt, Filecopy Source, Destination waarbij isk de 2 variablelen van te voeren declareer. Er is alleen 1 probleem als ik de paths in een picturebox laat zien zie ik waarom er een fout optreed als ik een bestand van c:/ gebuik. Hij neemt dan namelijk c://bestand.mpg dus een / te veel. Heb dit nog niet opgelost, zal morgen de nieuwe code plakken, kan er nu namelijk niet bij. (andere pc) Quote Link naar reactie
anoniem Geplaatst: 20 februari 2003 Auteur Delen Geplaatst: 20 februari 2003 \\ in je pad is een bekend probleem. Kijk anders eens bij MSDN hoe het FileSystemObject werkt. Simpeler bestaat echt niet. Het lost ook het dubbele backslashes probleem op. Quote Link naar reactie
Aanbevolen berichten
Om een reactie te plaatsen, moet je eerst inloggen