Associate file

Associate file

Postby AlexSchaft » Mon Jan 07, 2008 11:19 am

Hi,

How can I associate a file extension with my piece of software we've written from inside our software?
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Re: Associate file

Postby vilian » Mon Mar 07, 2011 8:12 pm

I also need it. Any idea how?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 975
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil

Re: Associate file

Postby amnunez » Tue Mar 08, 2011 3:15 am

Code: Select all  Expand view
#Define  nCLASSES_ROOT  1

LOCAL aFileExt := {'.pdf','.rtf','.doc','.xls'}

AEval(aFileExt, {|a,n|cRet := GetRegistry( nCLASSES_ROOT , a, "" ),;
                            IF (cRet <> nil .Or. cRet == '',,(;
                               IF (a == '.pdf',(cMsg += "   '.pdf'  =  PDF File Format(Acrobat Reader)" + CRLF, nFound := n),),;
                               IF (a == '.rtf',(cMsg += "   '.rtf'  =  RichText File Format(Word Pad) " + CRLF, nFound := n),),;
                               IF (a == '.doc',(cMsg += "   '.doc'  =  MS Word File Format(MS Office or Sun's OpenOffice)"  + CRLF, nFound := n),),;
                               IF (a == '.xls',(cMsg += "   '.xls'  =  MS Excel File Format(MS Office or Sun's OpenOffice)" + CRLF, nFound := n),);
           ))})

 
FWH10.6|BCC5.82|PELLEC|XMATE
amnunez
 
Posts: 24
Joined: Mon Jan 11, 2010 8:18 am

Re: Associate file

Postby Silvio » Tue Mar 08, 2011 9:01 am

it can be very good,
can you make a test sample to use it ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Associate file

Postby vilian » Fri Mar 11, 2011 12:45 pm

Ammunez,

Thanks, but This is not what I need. I want is to make the association between some types of files with my application. When the user makes a double click on the files, deploy my app.

Any ideas?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 975
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 84 guests