如何通过双击打开一个文档。
解决方案 »
- 对象实例化的问题
- 我这个定时发送怎么取不到值呢?
- 刚开始没经验,将所有的方法都写在窗体类了,现在函数多了想分下类,手工分太麻烦又怕把代码搞乱,有没有支持环境
- C#中关于一段ORACLE的链接串
- 为什么现在都提倡不要使用匈牙利方法来命名变量?
- URL
- 我用HtmlAgilityPack抓取页面在获取节点时发现的问题:
- 知道用户名密码,跳过登录界面
- 我怎么在系统文件中没有找到system.web.dll,在IDE就可以引用,c#.net是不是可以象java一样可以打包成class
- net 与 corba 通讯进行ssl 通讯的问题
- C#中Bitmap显示图片,并设置一些透明色的问题!
- MVC2下释放资源
private void Form1_Load(object sender, EventArgs e)
{
MessageBox.Show("DEBUG");
RunCommandLineArgs(Environment.GetCommandLineArgs());
} public void RunCommandLineArgs(string[] args)
{
string filename = "";
try
{
if (ApplicationDeployment.IsNetworkDeployed)
{
args = AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData;
if (args == null || args.Length == 0) return;
Uri uri = new Uri(args[0]);
filename = uri.LocalPath;
}
else
{
if (args == null) return;
foreach (var item in args)
{
if (Path.GetExtension(item) == ".myext")
{
filename = item;
break;
}
}
}
if (filename != "")
this.OpenDocument(filename);
}
catch (Exception ex)
{
Debug.WriteLine(ex);
}
} protected override void OnStartupNextInstance(StartupNextInstanceEventArgs eventArgs)
{
// Subsequent launches base.OnStartupNextInstance(eventArgs);
App.Activate();
App.RunCommandLineArgs(eventArgs.CommandLine.ToArray());
}