Winform启动另一个项目传值的方法
本文实例讲述了Winform启动另一个项目传值的方法。分享给大家供大家参考。具体如下:
背景:从A项目中登陆后,跳转到B项目的某个页面(B不再登陆)。
A项目启动进程:
publicForm1()
{
InitializeComponent();
}
#region调用进程
[DllImport("Shell32.dll")]
privatestaticexternintShellExecute(
IntPtrhwnd,
stringlpOperation, //多为"open"
stringlpFile, //文件名称
stringlpParameters, //参数
stringlpDirectory, //文件路径
intnShowCmd
);
///<summary>
///加载相应的应用程序
///</summary>
privatevoidStartApplication(stringprojname,stringarg)
{
ShellExecute(IntPtr.Zero,"Open",projname,arg,Application.StartupPath+@"\",1);
}
#endregion
privatevoidbtnJump_Click(objectsender,EventArgse) { StartApplication("B","Doctor,00045,14092701");//从这里跳转 }
热门推荐
10 病人祝福语老师寄语简短
11 新娘生孩子祝福语简短
12 婆婆66岁祝福语简短
13 今天孩子高考祝福语简短
14 送彩票生日祝福语简短
15 分别祝福语简短情话英文
16 画室揭牌仪式祝福语简短
17 女友妈妈生日祝福语简短
18 离别赠言离职祝福语简短