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 祝球员赛前祝福语简短
13 高温祝福语短语大全简短
14 宝宝周岁敬酒祝福语简短
15 好朋友夫妻祝福语简短
16 买房的祝福语高级简短
17 对疫情的简短祝福语
18 中秋送健康祝福语简短