将图标程序添加到上下文菜单(右键单击)并进行处理 [英] Adding icon program to context menu (right click) and processing

查看:73
本文介绍了将图标程序添加到上下文菜单(右键单击)并进行处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经编写了用于处理从excel文件获得的数据的程序.

何时打包以安装我的程序(使用Visual Studio安装项目).我遇到以下问题:

1.如何安装该程序,该程序的图标将添加到上下文菜单中(例如:当我右键单击excel文件(.xls)时,将看到该程序的图标(我的程序的名称)).这项工作类似于右键单击文件扩展名.rar时将看到winrar程序.我想知道Visual Studio设置项目是否不支持此功能吗?

2.以及如何将参数传输到我的程序中.我的目标是当我右键单击excel文件并从上下文菜单中选择程序的图标时,程序将被激活,然后程序将从该excel文件中读取数据.

我知道这是软件程序的常见任务.但是我真的很困惑.我真的很想知道这应该怎么办?

谢谢!!!

I have made program for the purpose of processing data obtained from excel file.

When package to install my program (use visual studio setup project). I am having a problem as follows:

1. How do you install the program, the program''s icon is added to context menu (Eg: when I right click on excel file (.xls) will see the icon of the program (my program'' name)). This work similar to when right click on the file extension .rar will see winrar program. I want to know whether visual studio setup project can not support this?

2. And how to transmit parameters into my program. My goal when I right-click the excel file and select icon my program from context menu, program will be activated, then my program will read data from that excel file.

I know this is a common task of a software program. But I''m really confused with it. I really want to understand how this should?

Thanks!!!

推荐答案

您可以按照以下步骤在VisualStudio中为应用程序配置iCon;

You can configure iCon for your application in VisualStudio as per the below steps;

1. Right click on the project to bring up the context menu. Now select "Properties".

2. In the projects property window select "Application". 

3. There is one entry that says "Icon and manifest". 

4. Right beside the textbox for the Icon is a button, which will bring up a file browser dialog. 

5. Click on that button and select your icon file.


我按照您的指示进行操作.但是,当我执行以下操作:右键单击excel文件并选择我的程序时,会出现错误消息:

此文件没有与执行此操作相关的程序"


我知道我没有在程序中传送excel文件的参数.虽然,如果我打开程序并选择excel文件的路径,该程序仍会从excel文件中读取数据.

非常感谢!
I follow your instructions. But when my actions: right-click the excel file and choose my program, error messages appear:

"This file does not have a program associated with it for performing this action"


I understand that I have not been transfer parameter of excel file in my program. Although, if I turn on the program and select path to excel file, the program is still read data from excel file.

Thanks a lot!


这篇关于将图标程序添加到上下文菜单(右键单击)并进行处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆