Solved

open wave file with cool edit from vb program

Posted on 2006-06-22
7
192 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
  • 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now