VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This code will change the name of your computer.

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


Rate This code will change the name of your computer.



'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


Download this snippet    Add to My Saved Code

This code will change the name of your computer. Comments

No comments have been posted about This code will change the name of your computer.. Why not be the first to post a comment about This code will change the name of your computer..

Post your comment

Subject:
Message:
0/1000 characters