“打开方式”题 [英] "Open with" question

查看:85
本文介绍了“打开方式”题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个小项目,它通过项目内部打开文本文件,但

我想将此应用程序与每个文本文件相关联。要进行测试,如果我

右击文本文件 - 然后打开和-my application ...

但是我的应用程序的文本区域(文本框,文本数据加载到的位置。)

打开空白,除了显示任何内容我的

项目应用程序的一般视图


我如何制作打开方式使用我的项目显示文本的关联

正确吗?


谢谢。

解决方案

< blockquote> 12月18日下午1:38,kimiraikkonen< kimiraikkone ... @ gmail.comwrote:




我有一个小项目,通过项目内部打开文本文件,但是
i希望将此应用程序与每个文本文件相关联。要进行测试,如果我

右击文本文件 - 然后打开和-my application ...

但是我的应用程序的文本区域(文本框,文本数据加载到的位置。)

打开空白,除了显示任何内容我的

项目应用程序的一般视图


我如何制作打开方式与我的项目显示文本的关联

正确吗?



所有打开方式 association确实启动了相关的

应用程序,其中包含在

命令行中单击的文件的完整路径。您的应用程序可以在命令行中看到有一个文件

名称并对其进行适当处理。


>怎么能我做打开使用我的项目显示文本的关联


>正确吗?



您的应用程序可能会接受

命令行上文件的路径。然后在应用程序期间解析命令行

启动,加载文件并在文本框中显示内容。

Mattias


-

Mattias Sj?gren [C#MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com

请回复到新闻组。


12月18日晚上9点12分,Mattias Sj?gren< mattias.dont.want.s ... @ mvps.org>

写道:


如何制作打开方式?与我的项目显示文本的关联

正确吗?



您的应用程序可能会接受

命令行上文件的路径。然后在应用程序期间解析命令行

启动,加载文件并在文本框中显示内容。


Mattias

-

Mattias Sj?gren [C#MVP] mattias @ mvps.orghttp://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com

请回复新闻组。



我的应用程序不是控制台应用程序,但是,我可以在哪里以及可以添加什么来创建打开方式?功能性?


Hi,
I have small project which opens text files via inside the project but
i want to associate this app for every text file. To have a test, if i
right click on a text file -then "open with" -my application...
but my app''s text area(textbox,where the text data is loaded into. )
is opened blank, nothing is displayed except a general view of my
project app

How can i make "open with" association to display text with my project
properly?

Thanks.

解决方案

On Dec 18, 1:38 pm, kimiraikkonen <kimiraikkone...@gmail.comwrote:

Hi,
I have small project which opens text files via inside the project but
i want to associate this app for every text file. To have a test, if i
right click on a text file -then "open with" -my application...
but my app''s text area(textbox,where the text data is loaded into. )
is opened blank, nothing is displayed except a general view of my
project app

How can i make "open with" association to display text with my project
properly?

All an "open with" association does is launch the associated
application with the complete path to the file clicked on in the
Command Line. It is up to your application to see that there is a file
name in the command line and process it appropriately.


>How can i make "open with" association to display text with my project

>properly?

Your application would likely accept the path to the file on the
command line. You then parse the command line during application
startup, load the file and display the content in the text box.
Mattias

--
Mattias Sj?gren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


On Dec 18, 9:12 pm, Mattias Sj?gren <mattias.dont.want.s...@mvps.org>
wrote:

How can i make "open with" association to display text with my project
properly?


Your application would likely accept the path to the file on the
command line. You then parse the command line during application
startup, load the file and display the content in the text box.

Mattias

--
Mattias Sj?gren [C# MVP] mattias @ mvps.orghttp://www.msjogren.net/dotnet/|http://www.dotnetinterop.com
Please reply only to the newsgroup.

My app is not a console application however, where and what can i add
this to create a "open with" functionality?


这篇关于“打开方式”题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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