For WPF application:
- Place a Button and TextBlock on the MainWindow.xaml form
- Create a name for the button and textblock. Example: TextBlock1,
Button1
Code Example #1
Private Sub load(sender As Object, e As EventArgs)Handles MyBase.Loaded
TextBlock1.Text = Environment.MachineName
End Sub
Code Example #2
Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs) Handles Button1.Click
TextBlock1.Text = Environment.MachineName
MyBase.Title = "Hello " + Environment.MachineName
End Sub
Hope this gives you a more understanding on how to show the users Computer Name.
I stopped using Windows Form Applications because they are way to laggy. Now I'm using WPF Applications mainly because its a lot smoother and it has more customizations and coding WPF applications are a lot similar to Windows Form Applications.