Hi see you again in Gambas 3 tutorial. On this tutorial, I want to share how to get the system host name using Gambas. The idea of this program is to display a text displaying the system host and architecture when a button is clicked.
The code are as follow:
Public Sub Form_Open()
btn_hostname.Text = "System Hostname"
Me.Center
Label1.Text = ""
Label2.Text = ""
End
Public Sub btn_hostname_Click()
Label1.Text = "My system host name is :" & system.Host =====get the system host name and displayed in Label1
Label2.Text = "My Operating System is :" & system.Family & " -" & system.Architecture =====get the system family and architecture in Label 2
End
Public Sub btn_exit_Click()
Me.Close
End
Comments :
0 comments to “How to get system host name using Gambas”
Post a Comment