⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 vb实例编程5
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "修改计算机名称"
   ClientHeight    =   2355
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   2355
   ScaleWidth      =   4680
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   450
      Left            =   2460
      TabIndex        =   2
      Top             =   1500
      Width           =   1635
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   450
      Left            =   645
      TabIndex        =   1
      Top             =   1500
      Width           =   1635
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   660
      TabIndex        =   0
      Text            =   "mr"
      Top             =   720
      Width           =   3315
   End
   Begin VB.Label Label1 
      Caption         =   "计算机名称"
      Height          =   315
      Left            =   660
      TabIndex        =   3
      Top             =   300
      Width           =   2685
   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 myNAME
  myNAME = SetComputerName(Text1.Text)
  MsgBox "修改成功,你的计算机名为 " & Text1.Text, vbInformation, "提示信息"
End Sub

Private Sub Command2_Click()
  End
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -