“打开方式”题

编程入门 行业动态 更新时间:2024-10-09 17:24:11
本文介绍了“打开方式”题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个小项目,它通过项目内部打开文本文件,但 我想将此应用程序与每个文本文件相关联。要进行测试,如果我 右击文本文件 - 然后打开和-my application ... 但是我的应用程序的文本区域(文本框,文本数据加载到的位置。) 打开空白,除了显示任何内容我的 项目应用程序的一般视图 我如何制作打开方式使用我的项目显示文本的关联 正确吗? 谢谢。

解决方案

12月18日下午1:38,kimiraikkonen< kimiraikkone ... @ gmailwrote:

我有一个小项目,通过项目内部打开文本文件,但是i希望将此应用程序与每个文本文件相关联。要进行测试,如果我 右击文本文件 - 然后打开和-my application ... 但是我的应用程序的文本区域(文本框,文本数据加载到的位置。) 打开空白,除了显示任何内容我的 项目应用程序的一般视图 我如何制作打开方式与我的项目显示文本的关联 正确吗?

所有打开方式 association确实启动了相关的 应用程序,其中包含在 命令行中单击的文件的完整路径。您的应用程序可以在命令行中看到有一个文件 名称并对其进行适当处理。

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

>正确吗?

您的应用程序可能会接受 命令行上文件的路径。然后在应用程序期间解析命令行 启动,加载文件并在文本框中显示内容。 Mattias - Mattias Sj?gren [C#MVP] mattias @ mvps www.msjogren/dotnet/ | www.dotnetinterop 请回复到新闻组。

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

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

您的应用程序可能会接受 命令行上文件的路径。然后在应用程序期间解析命令行 启动,加载文件并在文本框中显示内容。 Mattias - Mattias Sj?gren [C#MVP] mattias @ mvpshttp://www.msjogren/dotnet/ | www.dotnetinterop 请回复新闻组。

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

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...@gmailwrote:

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 www.msjogren/dotnet/ | www.dotnetinterop Please reply only to the newsgroup.

On Dec 18, 9:12 pm, Mattias Sj?gren <mattias.dont.want.s...@mvps> 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 @ mvpswww.msjogren/dotnet/|www.dotnetinterop 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?

更多推荐

“打开方式”题

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

发布评论

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

>www.elefans.com

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