คำตอบที่ได้รับเลือกจากเจ้าของกระทู้
ความคิดเห็นที่ 2
https://ss64.com/nt/start.html
Syntax
START "title" [/D path] [options] "command" [parameters]
START "title" [/D path] [options] "command" [parameters]
start "" "C:\IT-Application\ProjectIP\ProjectIP\bin\Debug\ProjectIP.exe" INVA INVA2
Dim arguments As String() = Environment.GetCommandLineArgs()
arguments(0) = @"C:\IT-Application\ProjectIP\ProjectIP\bin\Debug\ProjectIP.exe" ' True
arguments(1) = "INVA" ' True
arguments(2) = "INVA2" ' True
...
arguments(0) = @"C:\IT-Application\ProjectIP\ProjectIP\bin\Debug\ProjectIP.exe" ' True
arguments(1) = "INVA" ' True
arguments(2) = "INVA2" ' True
...
แสดงความคิดเห็น
มีใครพออ่านโค้ดนี้ออกบ้างครับ
เป็น bat file คือผมจะป้อน ค่า INVA ลงไปที่ form login ใน "txtuser"
ใช้เป็น vb.net ครับ
มันป้อนค่าไม่ลงอ่ะครับ
อันนี้ในส่วน vb
Public Shared Sub Main()
Console.WriteLine()
' Invoke this sample with an arbitrary set of command line arguments.
Dim arguments As String() = Environment.GetCommandLineArgs()
Console.WriteLine("GetCommandLineArgs: {2}", String.Join(", ", arguments))
'Console.ReadLine()
End Sub