VB Net – Set Or Get Value In Command Line Arguments

Thursday, March 29, 2012
































Desain Project Seperti Di atas dan Copy Code Di Bawah ini :
Mudah-Mudahan Bermanfaat
Public Class OpenFile
'Open File and Set Value To Command Line Arguments
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Open.Click
Dim file As New FileIO.FileSystem
Shell("TES.exe TES 123", 2) 'TES.exe adalah nama aplikasi yang akan buka | TES 123 adalah membuat isi Command line argments
End Sub
' Get Value In Command Line Arguments
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim arrParm(2) As String
arrParm = System.Environment.GetCommandLineArgs
MsgBox(arrParm(1))
MsgBox(arrParm(2))
End Sub
End Class

0 comments: