Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ShellExecute

Status
Not open for further replies.

speek

Technical User
Mar 29, 2008
25
US
I've made a frontend for a MP3 encoder (executetable console program). Until now the frontend created and launched a batch file. The downside of batch files is that it doesn't work if the filenames of the files that must be encoded contain accented characters. So now I want to use the ShellExecute function. But I cannot get it to work like I want. This is the code I use now:

------------------------------

Private Sub cmdEncode_Click()

For i = 1 To lvMp3.ListItems.Count
Set lst = lvMp3.ListItems.Item(i)

Command = fileOld & Chr(32) & fileNew & Chr(32) & cmbPreset.Text

ShellExecute Me.hwnd, "Open", App.Path & "\mppenc.exe", Command, "", 1

Next i

End Sub

-------------------------------

But despite the For Next command all files on the list are processed (encoded) at the same time. I want them to be processed one at a time and also in the same DOS-box.

Anyone has a suggestion for me? Thanks.

Wim Speekenbrink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top