Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

open wave file with cool edit from vb program

Posted on 2006-06-22
7
Medium Priority
?
208 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 13

Accepted Solution

by:
Mark_FreeSoftware earned 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

730 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