[[Template core/front/global/updateWarning is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]
هذا الكود يقوم بتنفيذ Command Line من Visual Basic 2010
التصميم
خصائص :
Form Name : form1 Caption : Compare two exe files TextBox 'Contains the command Line FC Name : TextBox1 MultiLine : True Text : @Echo Off FC C:\comp\CS.exe C:\comp\Cexe.exe /B TextBox 'Will contain the Comparison result of the two EXE application files. Name : TextBox2 MultiLine : True Text :Comparison Result will display here ... Button 'Executes the Command Line FC in the TextBox1 Name : Button1 Text : Go
الكود :
' --------------------------------------- '' Visual Basic Online Course ------------ '' By / evry1.net ------------------------ '' on Jan, 2014 -------------------------- '' Facebook : fb.com/Visual.Basic.Language '' --------------------------------------- 'Public Class Form1Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.ClickDim cmdInput As String = TextBox1.Text.Trim & "&"Dim proc As New Processproc.StartInfo.CreateNoWindow = Trueproc.StartInfo.UseShellExecute = Falseproc.StartInfo.FileName = "C:\Windows\System32\cmd.exe"proc.StartInfo.Arguments = cmdInputproc.StartInfo.RedirectStandardOutput = Trueproc.StartInfo.RedirectStandardError = Trueproc.StartInfo.RedirectStandardInput = Trueproc.Start()proc.StandardInput.WriteLine(cmdInput)proc.StandardInput.Close()Dim line As String = NothingDim lines As Integer = 0While (proc.StandardOutput.EndOfStream = False)line = proc.StandardOutput.ReadLine()TextBox2.AppendText(line & vbNewLine)lines = lines + 1End Whileproc.Close()proc.Dispose()End SubEnd Class
تم النشر منذ
هذا الكود يقوم بتنفيذ Command Line من Visual Basic 2010
التصميم
خصائص :
Form
Name : form1
Caption : Compare two exe files
TextBox
'Contains the command Line FC
Name : TextBox1
MultiLine : True
Text :
@Echo Off
FC C:\comp\CS.exe C:\comp\Cexe.exe /B
TextBox
'Will contain the Comparison result of the two EXE application files.
Name : TextBox2
MultiLine : True
Text :Comparison Result will display here ...
Button
'Executes the Command Line FC in the TextBox1
Name : Button1
Text : Go
الكود :
اذا كنت مهتما بالشرح
شارك هذا الرد
رابط المشاركة
شارك الرد من خلال المواقع ادناه