MsgBox(My.Computer.Name.ToString)
MsgBox(My.Computer.Name.ToString)
Public Function WriteToEventLog(ByVal Entry As String) Dim appName As String = “Your Application” Dim eventType As EventLogEntryType = EventLogEntryType.Error Dim logName = “Application” Dim objEventLog As New EventLog() Try If Not EventLog.SourceExists(appName) Then EventLog.CreateEventSource(appName, logName) Read more…
Code Snippet: Read and Parse CommandLine Arguments in VB.NET Dim myCommandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String) = My.Application.CommandLineArgs For i As Integer = 0 To myCommandLineArgs.Count – 1 MessageBox.Show(myCommandLineArgs(i)) Next Parameters are seperated by space.