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 妈妈生日祝福语简短励志