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

📄 form2.frm

📁 锥齿轮CAD设计
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFFFFF&
         Caption         =   "齿  顶  高:"
         Height          =   180
         Left            =   120
         TabIndex        =   14
         Top             =   5880
         Width           =   1080
      End
   End
   Begin VB.CommandButton Command7 
      Caption         =   "打印结果"
      Height          =   615
      Left            =   2160
      TabIndex        =   46
      Top             =   5040
      Width           =   975
   End
   Begin VB.CommandButton Command6 
      Caption         =   "校核计算"
      Height          =   615
      Left            =   2160
      TabIndex        =   45
      Top             =   6000
      Width           =   975
   End
   Begin VB.CommandButton Command3 
      Caption         =   "重设数据"
      Height          =   615
      Left            =   240
      TabIndex        =   44
      Top             =   6000
      Width           =   975
   End
   Begin VB.CommandButton Command4 
      Caption         =   "Exit"
      Height          =   615
      Left            =   240
      TabIndex        =   7
      Top             =   6960
      Width           =   975
   End
   Begin VB.CommandButton Command2 
      Caption         =   "参数计算"
      Height          =   615
      Left            =   240
      TabIndex        =   6
      Top             =   5040
      Width           =   975
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00FFFFFF&
      Caption         =   " 请输入已知参数:    "
      ForeColor       =   &H00FF0000&
      Height          =   4335
      Left            =   120
      TabIndex        =   4
      Top             =   360
      Width           =   3135
      Begin VB.CommandButton Command5 
         Caption         =   ".."
         Height          =   375
         Left            =   2640
         TabIndex        =   42
         Top             =   720
         Width           =   375
      End
      Begin VB.TextBox Text4 
         Appearance      =   0  'Flat
         BackColor       =   &H80000018&
         Height          =   390
         Left            =   1680
         TabIndex        =   1
         Top             =   1560
         Width           =   855
      End
      Begin VB.TextBox Text3 
         Appearance      =   0  'Flat
         BackColor       =   &H80000018&
         Height          =   375
         Left            =   1680
         TabIndex        =   3
         Top             =   3480
         Width           =   855
      End
      Begin VB.TextBox Text2 
         Appearance      =   0  'Flat
         BackColor       =   &H80000018&
         Height          =   375
         Left            =   1680
         TabIndex        =   2
         Top             =   2520
         Width           =   855
      End
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         BackColor       =   &H80000018&
         Height          =   375
         Left            =   1680
         TabIndex        =   0
         Top             =   720
         Width           =   855
      End
      Begin VB.Label Label20 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFFFFF&
         Caption         =   "o"
         Height          =   180
         Left            =   2640
         TabIndex        =   43
         Top             =   3480
         Width           =   90
      End
      Begin VB.Label Label4 
         BackColor       =   &H00FFFFFF&
         Caption         =   "小齿轮齿数:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   11
         Top             =   1560
         Width           =   1455
      End
      Begin VB.Label Label3 
         BackColor       =   &H00FFFFFF&
         Caption         =   "压  力  角:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   120
         TabIndex        =   10
         Top             =   3480
         Width           =   1455
      End
      Begin VB.Label Label2 
         BackColor       =   &H00FFFFFF&
         Caption         =   "大齿轮齿数:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   120
         TabIndex        =   9
         Top             =   2520
         Width           =   1695
      End
      Begin VB.Label Label1 
         BackColor       =   &H00FFFFFF&
         Caption         =   "模      数:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   120
         TabIndex        =   8
         Top             =   840
         Width           =   1575
      End
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()
Dim m As Single
Dim av As Double
Dim ha As Single
Dim hf As Single
Dim h As Single
Dim da As Single
Dim df As Single
Dim db As Single
Dim p As Single
Dim pb As Single
Dim s As Single
Dim e As Single
Dim a As Single
Dim d0 As Single
Dim d As Single
Dim i As Single
Dim z1 As Single
Dim z2 As Single
Dim c As Single
Dim avj As Single

z2 = Text2.Text
m = Text1.Text
z1 = Text4.Text
avj = Text3.Text

If z1 < 17 Then
Form18.Show
End If


av = 3.14 * avj / 180

d = m * z1
Text5.Text = d

Dim dd As Single
dd = m * z2
Text24.Text = dd

ha = 1 * m
Text6.Text = ha

hf = (1 + 0.25) * m
Text7.Text = hf

h = (2 * 1 + 0.25) * m
Text8.Text = h

da = (z1 + 2 * 1) * m
Text9.Text = da

Dim dda As Single
dda = (z2 + 2 * 1) * m
Text23.Text = dda

df = (z1 - 2 * 1 - 2 * 0.25) * m
Text10.Text = df

Dim ddf As Single
ddf = (z2 - 2 * 1 - 2 * 0.25) * m
Text22.Text = ddf


db = d * Cos(av)
Text11.Text = db

Dim ddb As Single
ddb = dd * Cos(av)
Text21.Text = ddb

p = 3.1415926 * m
Text12.Text = p

pb = p * Cos(av)
Text13.Text = pb

s = 3.1415926 * m / 2
Text14.Text = s

e = 3.1415926 * m / 2
Text15.Text = e

c = 0.25 * m
Text16.Text = c

a = (z1 + z2) * m / 2
Text17.Text = a

d0 = d
Text18.Text = d0

Dim dd0 As Single
dd0 = dd
Text20.Text = dd0

i = z2 / z1
Text19.Text = i

Text5.Enabled = True
Text6.Enabled = True
Text7.Enabled = True
Text8.Enabled = True
Text9.Enabled = True
Text10.Enabled = True
Text11.Enabled = True
Text12.Enabled = True
Text13.Enabled = True
Text14.Enabled = True
Text15.Enabled = True
Text16.Enabled = True
Text17.Enabled = True
Text18.Enabled = True
Text19.Enabled = True
Text20.Enabled = True
Text21.Enabled = True
Text22.Enabled = True
Text23.Enabled = True
Text24.Enabled = True



End Sub

Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = 20
Text4.Text = ""

Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text16.Text = ""
Text17.Text = ""
Text5.Text = ""
Text18.Text = ""
Text19.Text = ""

Text21.Text = ""
Text22.Text = ""
Text23.Text = ""
Text24.Text = ""
Text20.Text = ""




Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text10.Enabled = False
Text11.Enabled = False
Text12.Enabled = False
Text13.Enabled = False
Text14.Enabled = False
Text15.Enabled = False
Text16.Enabled = False
Text17.Enabled = False
Text18.Enabled = False
Text19.Enabled = False

End Sub

Private Sub Command4_Click()
Me.Hide
Form1.Show

End Sub

Private Sub Command5_Click()
Form6.Show
End Sub

Private Sub Command6_Click()
Form9.Show
Me.Hide
End Sub

Private Sub Command7_Click()
Form45.Show
End Sub

Private Sub Command8_Click()
Form46.Show
End Sub

Private Sub Form_Load()

Form1.Hide


Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text10.Enabled = False
Text11.Enabled = False
Text12.Enabled = False
Text13.Enabled = False
Text14.Enabled = False
Text15.Enabled = False
Text16.Enabled = False
Text17.Enabled = False
Text18.Enabled = False
Text19.Enabled = False
Text20.Enabled = False
Text21.Enabled = False
Text22.Enabled = False
Text23.Enabled = False
Text24.Enabled = False

Text3.Text = 20




End Sub

Private Sub Text1_GotFocus()
          Text1.SetFocus
          SendKeys "{Home}+{End}"
End Sub

Private Sub Text2_GotFocus()
Text2.SetFocus
          SendKeys "{Home}+{End}"
End Sub

Private Sub Text3_GotFocus()
Text3.SetFocus
          SendKeys "{Home}+{End}"
End Sub

Private Sub Text4_GotFocus()
Text4.SetFocus
          SendKeys "{Home}+{End}"
End Sub

⌨️ 快捷键说明

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