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 给外婆敬酒祝福语简短