如何在自己的应用程序中像“探索"中那样创建“打开方式"列表

编程入门 行业动态 更新时间:2024-10-10 19:23:18
本文介绍了如何在自己的应用程序中像“探索"中那样创建“打开方式"列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在我的应用程序中,用户可以选择对文件的引用,例如图像文件.我想使用带有箭头的按钮来打开一个列表,其中包含安装在系统上的程序,巫婆可以打开此文件类型.

In my application the user can select reference to file, for example a image file. I would like to make button with a arrow that opens a list with the programs installed on the system witch can open this file type.

我知道我可以从注册表"HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ FileExts"中获取程序名称,但是如何过滤出没有意义的条目-"DllHost.exe,miaui.exe等."以及如何使用用户选择的程序打开文件?

I know that I can get the program names from the registry "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts", but how can I filter the entries out that have no meaning - "DllHost.exe, miaui.exe, etc." And how can I open the file with program that the user choose?

@ Lars Tech如果我在注册表"HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ FileExts \"中查找,然后在扩展名".jpg"中查找"OpenWithList",则将看到更多条目,如果使用rigt单击jpg文件,然后选择打开方式"(请参阅​​我的第一张图片),我只想要那些.是的,我已经正确添加了程序的条目,但这些条目对jpg文件没有任何意义.Windows可以将它们过滤掉,我也可以.

@ Lars Tech If I look in registry "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\" and then "OpenWithList" for the extension ".jpg" I see more entries that if if rigt click on jpg file and choose Open With ( see my first images) and I only want those. And yes there is program's entries that I properly self have added, but that have no meaning to a jpg file. And Windows can filter them out so will I.

推荐答案

我认为您可以使用此文章进行验证并找出其中哪些适用于您的应用程序并有效

I think you can use this article to validate and find out which of them are applicable and valid in your application

更多推荐

如何在自己的应用程序中像“探索"中那样创建“打开方式"列表

本文发布于:2023-11-13 06:22:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1583686.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自己的   应用程序   方式   如何在   列表

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!