Public Sub Main(ByVal CmdArgs() As String)
Dim decLdate, decTbsdy As Decimal
If CmdArgs.Length = 0 Then
If getPbcLdate() <> 0 Then
decLdate = getPbcLdate()
End If
If getPbcTbsdy() <> 0 Then
decTbsdy = getPbcTbsdy()
End If
Else
decLdate = CmdArgs.GetValue(0)
decTbsdy = CmdArgs.GetValue(1)
End If
Catch ex As Exception
Finally
End Try
End Sub
在調用処
Shell("..\你的exe " & decLdate1 & " " & decTbsdy1, AppWinStyle.NormalFocus, False)
'订单模块
Module OrderModule
'定义sub main,项目启动,选择sub main启动
'aa()为参数数组,aa(0)保存userID和userName
Public Sub main(ByVal aa() As String)
If aa.GetUpperBound(0) < 0 Then
UserID = ""
UserName = ""
'参数为空,弹出登入窗体,重新登入
Else
'对aa(0),按"@"进行分割,SplitToArr函数自己再写,我写的不好.
dim lsArr()
SplitToArr(lsString, "@", lsArr)
UserID=lsArr(0)
UserName=lsArr(1)
'直接进入订单子系统
end if
End Sub
end Module
public shared function Main(byval args() as string)
{
if (args.Length = 2)'args(0)为UsreID,args(1)为UserName
application.run(new master(args(0),args(1))//传入参数
end if
end sub
master 类中:
public sub new(UsreID as string,UserName as string)
.........
MessageBox.Show(UsreID + vblf + UserName)
end sub