📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "设置计算机名称"
ClientHeight = 2550
ClientLeft = 60
ClientTop = 360
ClientWidth = 3465
LinkTopic = "Form1"
ScaleHeight = 2550
ScaleWidth = 3465
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 495
Left = 240
TabIndex = 2
Text = "在此输入:"
Top = 840
Width = 2775
End
Begin VB.CommandButton Command1
Caption = "设置"
Height = 495
Left = 1920
TabIndex = 0
Top = 1800
Width = 1095
End
Begin VB.Label Label1
Caption = "请输入新的计算机名称:"
Height = 255
Left = 360
TabIndex = 1
Top = 240
Width = 2655
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function SetComputerName Lib "kernel32" _
Alias "SetComputerNameA" ( _
ByVal lpComputerName As String _
) As Long
Private Sub Command1_Click()
'获取参数值
Dim Name As String
Name = Text1.Text
'调用
SetComputerName Name
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -