Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How to get associated programs of a particular file type.

4 posts in Objects Last posting was on 2007-09-19 08:11:32.0Z
neil Posted on 2007-09-18 04:59:34.0Z
Sender: 20ae.46ee2b7a.1804289383@sybase.com
From: Neil
Newsgroups: sybase.public.powerbuilder.objects
Subject: How to get associated programs of a particular file type.
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46ef5b36.3b28.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 17 Sep 2007 21:59:34 -0700
X-Trace: forums-1-dub 1190091574 10.22.241.41 (17 Sep 2007 21:59:34 -0700)
X-Original-Trace: 17 Sep 2007 21:59:34 -0700, 10.22.241.41
Lines: 22
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9477
Article PK: 736634

Hi,

How can I simulate like windows explorer where I have
several files listed in listview. Then display also the
icons associated with each file type.

When the user double clicks on that file, then it will be
opened by the default program associated with that file.

When the user right click and then go to "Open With", then
it will list all possible programs than can open the
particular file.

This is more like windows explorer or in the desktop where
you can double click on a file then it will be opened... Or
right click on it then Open With, then a list of programs
will appear.

How can I achieve that?

Thank you
Neil


Bruce Armstrong [TeamSybase] Posted on 2007-09-18 13:26:51.0Z
From: "Bruce Armstrong [TeamSybase]" <NOCANSPAM_bruce.armstrong@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: How to get associated programs of a particular file type.
Reply-To: NOCANSPAM_bruce.armstrong@teamsybase.com
Message-ID: <kfkve39j38tchtbib0sk7gjjbccvhtqh6m@4ax.com>
References: <46ef5b36.3b28.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 68-190-226-38.static.lsan.ca.charter.com
X-Original-NNTP-Posting-Host: 68-190-226-38.static.lsan.ca.charter.com
Date: 18 Sep 2007 06:26:51 -0700
X-Trace: forums-1-dub 1190122011 68.190.226.38 (18 Sep 2007 06:26:51 -0700)
X-Original-Trace: 18 Sep 2007 06:26:51 -0700, 68-190-226-38.static.lsan.ca.charter.com
Lines: 32
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9478
Article PK: 736635

The information about what programs are associated with a particular
file extension is in the registry.

You can launch a file using it's associated program using the
ShellExecute function in the Windows API.

On 17 Sep 2007 21:59:34 -0700, Neil wrote:

>Hi,
>
>How can I simulate like windows explorer where I have
>several files listed in listview. Then display also the
>icons associated with each file type.
>
>When the user double clicks on that file, then it will be
>opened by the default program associated with that file.
>
>When the user right click and then go to "Open With", then
>it will list all possible programs than can open the
>particular file.
>
>This is more like windows explorer or in the desktop where
>you can double click on a file then it will be opened... Or
>right click on it then Open With, then a list of programs
>will appear.
>
>How can I achieve that?
>
>Thank you
>Neil


neil Posted on 2007-09-19 06:52:40.0Z
Sender: 561b.46f07270.1804289383@sybase.com
From: Neil
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: How to get associated programs of a particular file type.
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46f0c738.5c4b.1681692777@sybase.com>
References: <kfkve39j38tchtbib0sk7gjjbccvhtqh6m@4ax.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 18 Sep 2007 23:52:40 -0700
X-Trace: forums-1-dub 1190184760 10.22.241.41 (18 Sep 2007 23:52:40 -0700)
X-Original-Trace: 18 Sep 2007 23:52:40 -0700, 10.22.241.41
Lines: 111
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9479
Article PK: 736636

Thank you for your reply... but I still can't get going. I
have examined the registry and found the following:

I just take 2 registry entries here for comparison. The txt
and xls files.

In the HKCR, file extension key

.txt
(Default) REG_SZ txtfile
Content Type REG_SZ text/plain
PercievedType REG_SZ text
subkeys:

+ OpenWithList
+ PersistentHandler
+ ShellNew


.xls
(Default) REG_SZ Excel.Sheet.8
Content Type REG_SZ application/vnd.ms-excel

In the HKCR, file type key

txtfile
(Default) REG_SZ Text Document
EditPadSaved REG_SZ Text Document
FriendlyTypeName REG_EXPAND_SZ
@%SystemRoot%\System32\notepad.exe,-469
+ Shell
+ Open
+ Command
Default REG_SZ "C:\Program
Files\JGsoft\EditPadLite\EditPadLite.exe %1


Excel.Sheet.8
(Default) REG_SZ Microsoft Excel Worksheet
EditFlags REG_BINARY 00 00 00 00
+ CLSID
+ DefaultIcon
+ DocObject
+ HTML Handler
+ Insertable
+ protocol
+ Shell
(Default) REG_SZ Open
+ New
+ Open
+ COmmand
(Default) REG_SZ "C:\Program Files\Microsoft
Office\Office10\EXCEL.EXE /e

Command REG_MULTI_SZ C84DVn-}f(YR]eAR6.jiEXCELFiles>EUFOC=M&g(pKeqFrsF*m
/e

+ ddeexec
+ Print
+ Printto



As you can observed, the location for the open command is
not common. In txt, it is under Shell/Open/Command, In xls
it is under Shell/Open/Command/Command.

Besides, when I open txt files from desktop or windows
explorer, it will be opened by notepad not editpadlite.

any ideas about this?

Thanks,
Neil

> The information about what programs are associated with a
> particular file extension is in the registry.
>
> You can launch a file using it's associated program using
> the ShellExecute function in the Windows API.
>
> On 17 Sep 2007 21:59:34 -0700, Neil wrote:
>
> >Hi,
> >
> >How can I simulate like windows explorer where I have
> >several files listed in listview. Then display also the
> >icons associated with each file type.
> >
> >When the user double clicks on that file, then it will be
> >opened by the default program associated with that file.
> >
> >When the user right click and then go to "Open With",
> then >it will list all possible programs than can open the
> >particular file.
> >
> >This is more like windows explorer or in the desktop
> where >you can double click on a file then it will be
> opened... Or >right click on it then Open With, then a
> list of programs >will appear.
> >
> >How can I achieve that?
> >
> >Thank you
> >Neil
>


neil Posted on 2007-09-19 08:11:32.0Z
Sender: 5c6e.46f0cb0b.1804289383@sybase.com
From: Neil
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: How to get associated programs of a particular file type.
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46f0d9b4.5dca.1681692777@sybase.com>
References: <46ef5b36.3b28.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 19 Sep 2007 01:11:32 -0700
X-Trace: forums-1-dub 1190189492 10.22.241.41 (19 Sep 2007 01:11:32 -0700)
X-Original-Trace: 19 Sep 2007 01:11:32 -0700, 10.22.241.41
Lines: 25
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9480
Article PK: 736637

oh nevermind... Its ok now... thanks!

> Hi,
>
> How can I simulate like windows explorer where I have
> several files listed in listview. Then display also the
> icons associated with each file type.
>
> When the user double clicks on that file, then it will be
> opened by the default program associated with that file.
>
> When the user right click and then go to "Open With", then
> it will list all possible programs than can open the
> particular file.
>
> This is more like windows explorer or in the desktop where
> you can double click on a file then it will be opened...
> Or right click on it then Open With, then a list of
> programs will appear.
>
> How can I achieve that?
>
> Thank you
> Neil