www.pudn.com > vbnumkey.rar > Form1.frm, change:2013-02-21,size:14989b


VERSION 5.00 
Begin VB.Form Form1  
   Caption         =   "Form1" 
   ClientHeight    =   6765 
   ClientLeft      =   60 
   ClientTop       =   450 
   ClientWidth     =   13545 
   LinkTopic       =   "Form1" 
   ScaleHeight     =   12990 
   ScaleWidth      =   21480 
   Begin VB.Frame Frame2  
      Caption         =   "工转电机" 
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   14.25 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   2055 
      Left            =   6120 
      TabIndex        =   13 
      Top             =   120 
      Width           =   5175 
      Begin VB.TextBox TxtSM1  
         Alignment       =   1  'Right Justify 
         Appearance      =   0  'Flat 
         BackColor       =   &H00000040& 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   26.25 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H0000FFFF& 
         Height          =   645 
         Index           =   1 
         Left            =   3840 
         TabIndex        =   19 
         Text            =   "0" 
         Top             =   750 
         Width           =   975 
      End 
      Begin VB.TextBox TxtSM1  
         Alignment       =   1  'Right Justify 
         Appearance      =   0  'Flat 
         BackColor       =   &H00000040& 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   26.25 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H0000FFFF& 
         Height          =   495 
         Index           =   0 
         Left            =   1440 
         TabIndex        =   17 
         Text            =   "0" 
         Top             =   1320 
         Width           =   855 
      End 
      Begin VB.Label Label8  
         Caption         =   "手动" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   24 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   615 
         Left            =   2640 
         TabIndex        =   18 
         Top             =   840 
         Width           =   1095 
      End 
      Begin VB.Label Label7  
         Caption         =   "自动" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   24 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   615 
         Left            =   120 
         TabIndex        =   16 
         Top             =   1320 
         Width           =   1095 
      End 
      Begin VB.Label Label6  
         Alignment       =   1  'Right Justify 
         BackColor       =   &H00000040& 
         Caption         =   "0" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   26.25 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H0000FF00& 
         Height          =   495 
         Left            =   1440 
         TabIndex        =   15 
         Top             =   600 
         Width           =   855 
      End 
      Begin VB.Label Label5  
         Caption         =   "电压" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   24 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   615 
         Left            =   120 
         TabIndex        =   14 
         Top             =   600 
         Width           =   1095 
      End 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "温控仪    1      2        3" 
      BeginProperty Font  
         Name            =   "宋体" 
         Size            =   14.25 
         Charset         =   134 
         Weight          =   400 
         Underline       =   0   'False 
         Italic          =   0   'False 
         Strikethrough   =   0   'False 
      EndProperty 
      Height          =   2055 
      Left            =   120 
      TabIndex        =   0 
      Top             =   120 
      Width           =   6015 
      Begin VB.CommandButton Command2  
         Caption         =   "更多设置" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   15.75 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   1455 
         Left            =   5280 
         TabIndex        =   12 
         Top             =   480 
         Width           =   615 
      End 
      Begin VB.TextBox TxtTSV1  
         Alignment       =   1  'Right Justify 
         Appearance      =   0  'Flat 
         BackColor       =   &H00000040& 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   26.25 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H0000FFFF& 
         Height          =   495 
         Index           =   2 
         Left            =   3600 
         TabIndex        =   9 
         Text            =   "0" 
         Top             =   1320 
         Width           =   855 
      End 
      Begin VB.TextBox TxtTSV1  
         Alignment       =   1  'Right Justify 
         Appearance      =   0  'Flat 
         BackColor       =   &H00000040& 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   26.25 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H0000FFFF& 
         Height          =   495 
         Index           =   1 
         Left            =   2400 
         TabIndex        =   8 
         Text            =   "0" 
         Top             =   1320 
         Width           =   855 
      End 
      Begin VB.TextBox TxtTSV1  
         Alignment       =   1  'Right Justify 
         Appearance      =   0  'Flat 
         BackColor       =   &H00000040& 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   26.25 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H0000FFFF& 
         Height          =   495 
         Index           =   0 
         Left            =   1200 
         TabIndex        =   7 
         Text            =   "0" 
         Top             =   1320 
         Width           =   855 
      End 
      Begin VB.Label Label4  
         Caption         =   "℃" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   26.25 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   615 
         Left            =   4680 
         TabIndex        =   11 
         Top             =   1320 
         Width           =   615 
      End 
      Begin VB.Label Label3  
         Caption         =   "℃" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   26.25 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   615 
         Left            =   4680 
         TabIndex        =   10 
         Top             =   600 
         Width           =   615 
      End 
      Begin VB.Label LabPv3  
         Alignment       =   1  'Right Justify 
         BackColor       =   &H00000040& 
         Caption         =   "0" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   26.25 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H0000FF00& 
         Height          =   495 
         Left            =   3600 
         TabIndex        =   5 
         Top             =   600 
         Width           =   855 
      End 
      Begin VB.Label LabPv2  
         Alignment       =   1  'Right Justify 
         BackColor       =   &H00000040& 
         Caption         =   "0" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   26.25 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H0000FF00& 
         Height          =   495 
         Left            =   2400 
         TabIndex        =   4 
         Top             =   600 
         Width           =   855 
      End 
      Begin VB.Label LabPv1  
         Alignment       =   1  'Right Justify 
         BackColor       =   &H00000040& 
         Caption         =   "0" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   26.25 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         ForeColor       =   &H0000FF00& 
         Height          =   495 
         Left            =   1200 
         TabIndex        =   3 
         Top             =   600 
         Width           =   855 
      End 
      Begin VB.Label Label2  
         Caption         =   "SV:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   26.25 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   615 
         Left            =   120 
         TabIndex        =   2 
         Top             =   1320 
         Width           =   735 
      End 
      Begin VB.Label Label1  
         Caption         =   "PV:" 
         BeginProperty Font  
            Name            =   "宋体" 
            Size            =   26.25 
            Charset         =   134 
            Weight          =   400 
            Underline       =   0   'False 
            Italic          =   0   'False 
            Strikethrough   =   0   'False 
         EndProperty 
         Height          =   615 
         Left            =   120 
         TabIndex        =   1 
         Top             =   600 
         Width           =   735 
      End 
   End 
   Begin VB.CommandButton Command1  
      Caption         =   "Command1" 
      Height          =   735 
      Left            =   480 
      Style           =   1  'Graphical 
      TabIndex        =   6 
      Top             =   3120 
      Width           =   1335 
   End 
   Begin VB.Shape Shape1  
      BorderColor     =   &H00000000& 
      BorderWidth     =   2 
      FillColor       =   &H00004000& 
      FillStyle       =   0  'Solid 
      Height          =   375 
      Left            =   11640 
      Shape           =   3  'Circle 
      Top             =   3240 
      Width           =   375 
   End 
End 
Attribute VB_Name = "Form1" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
 
Private Sub Command1_Click() 
Static Bl As Boolean 
  Bl = Not Bl 
  If Bl = True Then 
    Shape1.FillColor = vbGreen 
  Else 
    Shape1.FillColor = &H4000 
  End If 
 
End Sub 
 
 
 
 
Private Sub TxtSM1_Change(Index As Integer) 
Dim I As Integer 
 
I = Int(Val(TxtSM1(Index).Text)) 
If I > 100 Then 
  I = 100 
End If 
TxtSM1(Index).Text = I 
End Sub 
 
Private Sub TxtSM1_Click(Index As Integer) 
TxtSM1(Index).SetFocus   '点击到的文本框设置为焦点 
Set Frmname = Form1       'Frmname在模块中设置为PUBLIC,FORM对象,不同的窗口调用数字键盘时,把Frmname设置成相应的窗口的名字 
Load FrmNumber            '打开数字键盘窗口 
FrmNumber.Show 1          '设置为有模窗口,必须退出此窗口才能转移焦点到其他窗口 
End Sub 
 
Private Sub TxtTSV1_Change(Index As Integer) 
'设定控制温度值变化时,转换为整数,并判断是否大于500,如果大于500,则等于500 
Dim I As Integer 
 
I = Int(Val(TxtTSV1(Index).Text)) 
If I > 500 Then 
  I = 500 
End If 
TxtTSV1(Index).Text = I 
End Sub 
 
Private Sub TxtTSV1_Click(Index As Integer) 
'点击控制温度文本框子过程 
TxtTSV1(Index).SetFocus   '点击到的文本框设置为焦点 
Set Frmname = Form1       'Frmname在模块中设置为PUBLIC,FORM对象,不同的窗口调用数字键盘时,把Frmname设置成相应的窗口的名字 
Load FrmNumber            '打开数字键盘窗口 
FrmNumber.Show 1          '设置为有模窗口,必须退出此窗口才能转移焦点到其他窗口 
End Sub