by Muhammad Hanif (1 Submission)
Category: Windows System Services
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 19th July 2001
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
This code will change the name of your computer.
API Declarations
Public Declare Function SetComputerName Lib "kernel32" Alias "SetComputerNameA" (ByVal lpComputerName As String) As Long
'at the click event of the command button add this code
Private Sub Command1_Click()
Dim a
Dim b
a = MsgBox("this will change the name of your system", vbYesNo + vbInformation)
If ans = vbYes Then
b = SetComputerName(Text1.Text)
End If
End Sub