| 'program renames your computer , requires a text box and a command button
Private Declare Function SetComputerName Lib "kernel32" Alias "SetComputerNameA" (ByVal lpComputerName As String) As Long
Private Sub Command1_Click()
Dim change
Dim SetName
change = MsgBox("this will change the name of your system", vbYesNo + vbInformation)
If change = vbYes Then
SetName = SetComputerName(Text1.Text)
End If
End Sub
|