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

📄 form1.frm

📁 vb源码大全
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   2130
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6570
   LinkTopic       =   "Form1"
   ScaleHeight     =   2130
   ScaleWidth      =   6570
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton cmdDelete 
      Caption         =   "删除"
      Height          =   375
      Left            =   3960
      TabIndex        =   6
      Top             =   1200
      Width           =   1335
   End
   Begin VB.CommandButton cmdFind 
      Caption         =   "查找"
      Height          =   375
      Left            =   2160
      TabIndex        =   5
      Top             =   1200
      Width           =   1335
   End
   Begin VB.CommandButton cmdSave 
      Caption         =   "保存"
      Height          =   375
      Left            =   480
      TabIndex        =   4
      Top             =   1200
      Width           =   1335
   End
   Begin VB.TextBox txtCompany 
      Height          =   375
      Left            =   3720
      TabIndex        =   3
      Top             =   360
      Width           =   1695
   End
   Begin VB.TextBox txtName 
      Height          =   375
      Left            =   960
      TabIndex        =   2
      Top             =   360
      Width           =   1575
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "公司名:"
      Height          =   180
      Left            =   2880
      TabIndex        =   1
      Top             =   480
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "姓名:"
      Height          =   180
      Left            =   240
      TabIndex        =   0
      Top             =   480
      Width           =   540
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdSave_Click()
        '将两个文本框中的内容分别赋给MyApp下User区中Name和Company
        SaveSetting "MyApp", "User", "Name", txtName
        SaveSetting "MyApp", "User", "Company", txtCompany
        MsgBox "您的信息已成功保存!"
End Sub
Private Sub cmdFind_Click()
        '查找MyApp下User区中Name和Company的设置值并显示
If GetSetting("MyApp", "User", "Name") = "" Then
            MsgBox "在注册表中未找到该项内容!"
        Else
            MsgBox "您的姓名是:" & GetSetting("MyApp", "User", "Name") & Chr(13) & Chr(10) & _
           "您的公司是:" & GetSetting("MyApp", "User", "Company")
End If
End Sub
Private Sub cmdDelete_Click()

'删除MyApp下的User区域及其下的所有注册表项
DeleteSetting "MyApp", "User"
MsgBox "该项设置已删除。"
End Sub

⌨️ 快捷键说明

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