【问题标题】:How can I allow my program to open a file when "Open with" is used?使用“打开方式”时,如何允许我的程序打开文件?
【发布时间】:2014-01-20 03:09:31
【问题描述】:

我用 C# 编写了一个文字处理器。当用户右键单击文件并选择“打开方式”并选择我的程序时,我想允许我的程序打开文件。如何在我的程序中实现这样的功能?目前,用户打开文件的唯一方法是使用 OpenFileDialog。

到目前为止,如果用户选择“打开方式”并选择我的程序,它不会打开他们选择的文件。

实现此功能的最佳方式是什么?

【问题讨论】:

标签: c# file-io richtextbox richtext open-with


【解决方案1】:

“打开方式”将文件名作为参数传递给应用程序。

Take a look at the args parameter here.

【讨论】:

    猜你喜欢
    • 2013-03-09
    • 2013-07-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-30
    • 2014-04-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多