Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
Dim message As String
message = "ใส่ Box No."
BoxNumber= InputBox(message, "ใส่ Box No.", , 500, 50)
Label13.Text = BoxNumber.ToString
WriteOutput("Box. " + BoxNumber.ToString)
End Sub
เก็บ log Code (VB.NET)
Public Sub WriteOutput(ByVal task As String)
Dim fileCount As System.IO.StreamWriter
fileCount = My.Computer.FileSystem.OpenTextFileWriter("D:\CountOutput.txt", True)
fileCount.WriteLine(task + " " + Date.Now)
fileCount.Close()
End Sub
Tag : .NET, VS 2008 (.NET 3.x), VS 2010 (.NET 4.x), C