📄 setcomputername.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 1785
ClientLeft = 60
ClientTop = 345
ClientWidth = 5100
LinkTopic = "Form1"
ScaleHeight = 1785
ScaleWidth = 5100
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "恢复"
Height = 375
Left = 2580
TabIndex = 4
Top = 1260
Width = 975
End
Begin VB.CommandButton Command1
Caption = "设置"
Height = 375
Left = 1260
TabIndex = 2
Top = 1260
Width = 1035
End
Begin VB.TextBox Text1
Height = 270
Left = 1200
TabIndex = 0
Top = 720
Width = 3195
End
Begin VB.Label Label2
Caption = "Label2"
Height = 255
Left = 120
TabIndex = 3
Top = 180
Width = 3075
End
Begin VB.Label Label1
Caption = "新计算机名:"
Height = 255
Left = 60
TabIndex = 1
Top = 720
Width = 915
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim OldName As String
Private Sub Command1_Click()
Dim tempstr As String, flag As Boolean
tempstr = Text1.Text
If Text1.Text <> "" Then
flag = SetName(tempstr)
End If
End Sub
Private Sub Form_Load()
Dim tempstr As String, flag As Boolean
flag = GetName(tempstr)
If flag Then
OldName = tempstr
Label2.Caption = OldName
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -