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

📄 form3.frm

📁 该程序是思路是经过专门的顾问专家集十年的经验设计
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form3 
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   6180
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6615
   Icon            =   "Form3.frx":0000
   LinkTopic       =   "Form3"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6180
   ScaleWidth      =   6615
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Height          =   990
      Left            =   375
      TabIndex        =   5
      Top             =   4485
      Width           =   5910
      Begin VB.TextBox Text3 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   840
         MaxLength       =   255
         TabIndex        =   9
         Top             =   600
         Width           =   4830
      End
      Begin VB.TextBox Text2 
         Appearance      =   0  'Flat
         Height          =   270
         Left            =   840
         MaxLength       =   255
         TabIndex        =   8
         Top             =   225
         Width           =   4830
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Height          =   165
         Index           =   1
         Left            =   285
         TabIndex        =   7
         Top             =   675
         Width           =   555
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Height          =   165
         Index           =   0
         Left            =   285
         TabIndex        =   6
         Top             =   315
         Width           =   555
      End
   End
   Begin VB.CommandButton Command2 
      Cancel          =   -1  'True
      Height          =   405
      Left            =   3660
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   5595
      Width           =   1755
   End
   Begin VB.CommandButton Command1 
      Default         =   -1  'True
      Height          =   405
      Left            =   1200
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   5595
      Width           =   1755
   End
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   4000
      Left            =   315
      ScaleHeight     =   3975
      ScaleWidth      =   5970
      TabIndex        =   0
      TabStop         =   0   'False
      Top             =   405
      Width           =   6000
      Begin VB.TextBox Text1 
         Alignment       =   2  'Center
         Appearance      =   0  'Flat
         BorderStyle     =   0  'None
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   180
         Index           =   0
         Left            =   180
         TabIndex        =   2
         Top             =   45
         Visible         =   0   'False
         Width           =   375
      End
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Height          =   225
      Left            =   735
      TabIndex        =   4
      Top             =   165
      Width           =   5400
   End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim TTT As Byte
Dim TF As Boolean

Private Sub Command1_Click()
Dim SS As String
Dim St As String
Dim i As Long
For i = 1 To 130        '将结果转为字符串
Select Case Text1(i).Text
Case "+"
    If i < 92 Then
        SS = "2"
    Else
        SS = "0"
    End If
Case "-"
    If i < 92 Then
        SS = "0"
    Else
        SS = "2"
    End If
Case "/": SS = "1"
Case Else
    MsgBox "请输入第:" & i & " 道题目!   ", vbInformation
    Text1(i).SetFocus
    Exit Sub
End Select
St = St + SS
Next
If Text3.Text = "" Or Text2.Text = "" Then MsgBox "请填写自我性格总结!   ", vbInformation: Exit Sub
StrJG = St
UserN = Form1.Text1(0).Text
UserS = Form1.Text1(1).Text
UserA = Form1.Text1(2).Text
UserL = Form1.Text1(3).Text
UserD = Form1.Text1(4).Text
UserT = Form1.Text1(5).Text
UserCC = Text2.Text
UserDC = Text3.Text
Rs1.AddNew
For i = 0 To 5
If Form1.Text1(i).Text <> "" Then Rs1.Fields(i).Value = Form1.Text1(i).Text
Form1.Text1(i).Text = ""
Next
Rs1.Fields(6).Value = StrJG
Rs1.Fields(7).Value = Text2.Text
Rs1.Fields(8).Value = Text3.Text
Rs1.Update
Form1.CSJG
Unload Me
End Sub

Private Sub Command2_Click()
Unload Me
End Sub


Private Sub Form_Activate()
Text1(1).SetFocus
End Sub

Private Sub Form_Load()     '初始化值
Dim i As Long
Dim j As Long
Dim t As Long
Me.Caption = "答案输入"
Label1.Caption = "说明:“+”(表示是)“-”(表示不是)“/”(表示不知道)"
Frame1.Caption = "自我性格总结"
Label3(0).Caption = "长处:"
Label3(1).Caption = "短处:"
Command1.Caption = "完 成"
Command2.Caption = "退 出"
Picture1.Scale (0, 0)-(100, 130)
For i = 0 To 9
For j = 1 To 13
t = i * 13 + j
Load Text1(t)
Text1(t).Text = t
Text1(t).Top = j * 10 - 8
Text1(t).Left = i * 10 + 2
Text1(t).Visible = True
Next
Next
End Sub

Private Sub Picture1_Paint()
Dim i As Long
For i = 1 To 12     '画表格
Picture1.Line (0, i * 10)-(120, i * 10)
Picture1.Print "1"
Next
For i = 1 To 10
Picture1.Line (i * 10, 130)-(i * 10, 0)
Next
End Sub

Private Sub Text1_GotFocus(Index As Integer)
            Text1(Index).SelStart = 0
            Text1(Index).SelLength = Len(Text1(Index).Text)
            Text1(Index).MaxLength = 1
End Sub

Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
Dim i As Long
If KeyCode > 36 And KeyCode < 41 Then
Select Case KeyCode
    Case 37
        i = Index - 13
        If i < 1 Then Exit Sub
    Case 38
        i = Index - 1
        If i < 1 Then Exit Sub
        Case 39
        i = Index + 13
        If i > 130 Then Exit Sub
    Case 40
        i = Index + 1
        If i > 130 Then Exit Sub
End Select
            Text1(i).SetFocus
End If
End Sub

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If InStr("+-/" + Chr(22), Chr(KeyAscii)) = 0 Then
KeyAscii = 0
Else
TF = True
End If
End Sub
'判断光标,以便移动
Private Sub Text1_KeyUp(Index As Integer, KeyCode As Integer, Shift As Integer)
If TF And Index < 130 Then Text1(Index + 1).SetFocus: TF = False
End Sub

⌨️ 快捷键说明

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