Solved

open wave file with cool edit from vb program

Posted on 2006-06-22
7
193 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

911 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

16 Experts available now in Live!

Get 1:1 Help Now