Solved

open wave file with cool edit from vb program

Posted on 2006-06-22
7
201 Views
Last Modified: 2010-04-07
hi every body
am useing visuall basic 6 to open and play wave files
with mmcontrol and mcisendstring
instead of opening the wave file with mmcontrol ineed to use cool edit i just want my users to provide the path of the wave file and automaticly open with cool edit which installed in my computer
thank inadvance
0
Comment
Question by:bahamo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 13

Expert Comment

by:Mark_FreeSoftware
ID: 16963251

have you tried this:

shell """c:\path\to\cooledit.wav"" ""c:\path\to\wave.wav"""
0
 

Author Comment

by:bahamo
ID: 16967089
yes that one is working good but the problem is that iwant my user to provide the path useing atext box and itry the code below and it doesnot work:

dim pathfile as string
pathfile=text1.text
shell """c:\path\to\cooledit.wav"" "" pathfile"""
also is it possible to drag and drop the audio file from visuall basic from to apllication like cooledit
0
 
LVL 8

Expert Comment

by:kaliyugkaarjun
ID: 16968595
U can get input in ur text box from user
then use shellexecute to invoke cooledit exe.

Public Declare Function ShellExecute _
      Lib "shell32.dll" _
      Alias "ShellExecuteA" ( _
      ByVal hwnd As Long, _
      ByVal lpOperation As String, _
      ByVal lpFile As String, _
      ByVal lpParameters As String, _
      ByVal lpDirectory As String, _
      ByVal nShowCmd As Long) _
      As Long

Dim lngErr As Long
pathfile = text1.text

lngErr = ShellExecute(0, "OPEN", pathfile, "", "", 0)
\\chk value of IngErr if it is 0 ten it is successfully invoked...



0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 13

Accepted Solution

by:
Mark_FreeSoftware earned 500 total points
ID: 16969321
>>yes that one is working good but the problem is that iwant my user to provide the path useing atext box and itry the code below and it doesnot work


then try this:

dim pathfile as string
pathfile=text1.text
shell """c:\path\to\cooledit.exe"" """ & pathfile & """"
0
 

Author Comment

by:bahamo
ID: 16970600
thank for reply
conncerinig the reply from kaliyugkaarjun , i understand that
pathfile is the path of the udio file it self ,what i dont understand where is the path of my cooledit ?
imean where to write the full path in the shellexecute
thank in advance
0
 
LVL 13

Expert Comment

by:Mark_FreeSoftware
ID: 16971169

that is not neccesarily if cooledit is the default program to open wav files

else it won't work
0
 
LVL 8

Expert Comment

by:kaliyugkaarjun
ID: 16974089
Mark_FreeSoftware  is right...

If u specify lpFile as an executable file then lpParameters will e parameter to be passed to that file.

So try this ,

Public Declare Function ShellExecute _
     Lib "shell32.dll" _
     Alias "ShellExecuteA" ( _
     ByVal hwnd As Long, _
     ByVal lpOperation As String, _
     ByVal lpFile As String, _
     ByVal lpParameters As String, _
     ByVal lpDirectory As String, _
     ByVal nShowCmd As Long) _
     As Long

Dim lngErr As Long
Program = c:\cooledit.exe // path of cooledit executable
pathfile = text1.text

lngErr = ShellExecute(0, "OPEN", Pragram, pathfile, "", SW_SHOWNORMAL)
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month6 days, 5 hours left to enroll

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question