码迷,mamicode.com
首页 > Windows程序 > 详细

Winform启动另一个项目传值的方法

时间:2017-12-05 22:43:35      阅读:340      评论:0      收藏:0      [点我收藏+]

标签:poi   打开   方法   inter   一个   startup   解决方案   opera   str   

本文实例讲述了Winform启动另一个项目传值的方法。分享给大家供大家参考。具体如下:

背景:从A项目中登陆后,跳转到B项目的某个页面(B不再登陆)。

A项目启动进程:


代码如下:


public Form1()

{

InitializeComponent();

}

#region 调用进程

[DllImport(“Shell32.dll”)]

private static extern int ShellExecute(

IntPtr hwnd,

string lpOperation,      //多为”open”

string lpFile,           //文件名称

string lpParameters,   //参数

string lpDirectory,      //文件路径

int nShowCmd

);

/// <summary>

/// 加载相应的应用程序

/// </summary>

private void StartApplication(string projname, string arg)

{

ShellExecute(IntPtr.Zero, “Open”, projname, arg, Application.StartupPath + @”\”, 1);

}

#endregion


private void btnJump_Click(object sender, EventArgs e)

{

StartApplication(“B”, “Doctor,00045,14092701”);//从这里跳转

}

除声明外,跑步客文章均为原创,转载请以链接形式标明本文地址
  Winform启动另一个项目传值的方法

本文地址:  http://www.paobuke.com/develop/c-develop/pbk23318.html






相关内容

Winform启动另一个项目传值的方法

标签:poi   打开   方法   inter   一个   startup   解决方案   opera   str   

原文地址:http://www.cnblogs.com/paobuke/p/7989641.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!