问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

悬赏!求课程设计任务书!!“设计CA6140车床输出轴零件机械加工工艺规程及工艺装备!!

发布网友 发布时间:2022-05-04 18:43

我来回答

2个回答

热心网友 时间:2023-10-05 15:34

'窗体不用添加任何控件的计算机,只需复制代码即可。
Option Explicit

Dim 按钮(3, 3) As String
Dim 数 As String, 数1 As String, 显示 As String, 计算 As String
Dim 开始 As Boolean, mXs As Boolean, 复位 As Boolean
Dim pX As Integer, pY As Integer, mW As Long, mH As Long, bW As Long, bH As Long
Const Pi As Double = 3.1415926

'过程和函数
Private Sub ItemSkin(ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, _
ByVal Caption As String, Optional ByVal State As Integer = 0)
Dim i As Long
Select Case State
Case 0
For i = Y1 To Y2 Step 15
Line (X1, i)-(X2, i), RGB(160 + 95 * (Y2 - i) / (Y2 - Y1), 160 + 95 * (Y2 - i) / (Y2 - Y1), 160 + 95 * (Y2 - i) / (Y2 - Y1)), B
Next
PSet (X1 + 2 * pX, Y1 + 2 * pY), &H80000010
PSet (X2 - 2 * pX, Y1 + 2 * pY), &H80000010
PSet (X1 + 2 * pX, Y2 - 2 * pY), &H80000010
PSet (X2 - 2 * pX, Y2 - 2 * pY), &H80000010
Line (X1 + pX, Y1 + pX)-(X2 - pX, Y2 - pY), &H80000010, B
Case 1
For i = Y1 To Y2 Step 15
Line (X1, i)-(X2, i), RGB(160 + 95 * (Y2 - i) / (Y2 - Y1), 160 + 95 * (Y2 - i) / (Y2 - Y1), 160 + 95 * (Y2 - i) / (Y2 - Y1)), B
Next
Line (X1 + pX, Y1 + pX)-(X2 - pX, Y2 - pY), &H80C0FF, B
Line (X1 + 2 * pX, Y1 + 2 * pX)-(X2 - 2 * pX, Y2 - 2 * pY), &H80C0FF, B
Case 2
For i = Y1 To Y2 Step 15
Line (X1, i)-(X2, i), RGB(255 - 95 * (Y2 - i) / (Y2 - Y1), 255 - 95 * (Y2 - i) / (Y2 - Y1), 255 - 95 * (Y2 - i) / (Y2 - Y1)), B
Next
PSet (X1 + 2 * pX, Y1 + 2 * pY), &H80000015
PSet (X2 - 2 * pX, Y1 + 2 * pY), &H80000015
PSet (X1 + 2 * pX, Y2 - 2 * pY), &H80000015
PSet (X2 - 2 * pX, Y2 - 2 * pY), &H80000015
Line (X1 + pX, Y1 + pX)-(X2 - pX, Y2 - pY), &H80000015, B
End Select
PSet (X1 + pX, Y1 + pY), &HA06040
PSet (X2 - pX, Y1 + pY), &HA06040
PSet (X1 + pX, Y2 - pY), &HA06040
PSet (X2 - pX, Y2 - pY), &HA06040
Line (X1, Y1)-(X2, Y2), &HA06040, B
PSet (X1, Y1), Me.BackColor
PSet (X1, Y2), Me.BackColor
PSet (X2, Y1), Me.BackColor
PSet (X2, Y2), Me.BackColor

Me.CurrentX = (X2 - X1 - Me.TextWidth(Caption)) / 2 + X1
Me.CurrentY = (Y2 - Y1 - Me.TextHeight(Caption)) / 2 + Y1
Print Caption

End Sub

Private Sub FormRecord(ByVal i显示 As String, Optional ByVal i计算 As String = "")
Dim iX As Integer, iY As Integer
Cls
Line (1200, 240)-(mW - 240, 600), &H80000005, BF
Line (1200, 240)-(mW - 240, 600), &HC0A0A0, B

ItemSkin 240, 240, 1080, 600, "AC"

For iX = 0 To 3
For iY = 0 To 3
ItemSkin bW * iX + 240, bH * iY + 840, bW * (iX + 1) - 120, bH * (iY + 1) + 600, 按钮(iX, iY)
Next
Next
Me.CurrentX = mW - Me.TextWidth(i显示) - 360
Me.CurrentY = (360 - Me.TextHeight(i显示)) / 2 + 240
Print i显示
Me.CurrentX = 1320
Me.CurrentY = (360 - Me.TextHeight(i计算)) / 2 + 240
Print i计算
End Sub
Private Sub mMouseMove(Button As Integer, X As Single, Y As Single)
Dim iX As Integer, iY As Integer
If X > 240 And X < 1080 And Y > 240 And Y < 600 Then
ItemSkin 240, 240, 1080, 600, "AC", IIf(Button = 1, 2, 1)
ElseIf X < 240 Or X > mW - 240 Or Y < 840 Or Y > mH - 240 Then
FormRecord Format(显示, "0.#######"), 计算
Else
For iX = 0 To 3
For iY = 0 To 3
If X > bW * iX + 240 And Y > bH * iY + 840 And X < bW * (iX + 1) - 120 And Y < bH * (iY + 1) + 600 Then
ItemSkin bW * iX + 240, bH * iY + 840, bW * (iX + 1) - 120, bH * (iY + 1) + 600, 按钮(iX, iY), IIf(Button = 1, 2, 1)
Else
ItemSkin bW * iX + 240, bH * iY + 840, bW * (iX + 1) - 120, bH * (iY + 1) + 600, 按钮(iX, iY)
End If
Next
Next
End If
End Sub

Private Function mCount(ByVal i数 As String, ByVal i计算 As String, Optional ByVal i等 As Boolean = False) As String
On Error GoTo ErrStr
If 计算 <> i计算 Then
计算 = i计算
数1 = 数
mCount = 数
ElseIf (i等 Or 开始 = False) And 计算 <> "" Then
Select Case 计算
Case "+"
数1 = Val(数1) + Val(i数)
Case "-"
数1 = Val(数1) - Val(i数)
Case "*"
数1 = Val(数1) * Val(i数)
Case "/"
数1 = Val(数1) / Val(i数)
End Select
mCount = 数1
ElseIf i等 Then
mCount = 数
Else
mCount = 数1
End If
复位 = i等
开始 = True
Exit Function
ErrStr:
显示 = 0
数 = 0
数1 = 0
开始 = False
mXs = False
计算 = ""
mCount = "Error"
End Function

'事件
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 8 Or KeyAscii = 27 Then
显示 = 0
数 = 0
数1 = 0
计算 = ""
mXs = False
ElseIf Chr(KeyAscii) >= 0 And Chr(KeyAscii) < 10 Then
If 开始 Then 数 = 0
If 复位 Then
数1 = 0
计算 = ""
End If
If Len(CStr(Val(显示))) < 8 Then 数 = 数 & IIf(mXs, ".", "") & Chr(KeyAscii)
显示 = 数
开始 = False
mXs = False
复位 = False
ElseIf Chr(KeyAscii) = "." Then
If Int(显示) = 显示 Then mXs = True
ElseIf Chr(KeyAscii) = "+" Or Chr(KeyAscii) = "-" Or Chr(KeyAscii) = "*" Or Chr(KeyAscii) = "/" Then
显示 = mCount(数, Chr(KeyAscii))
ElseIf Chr(KeyAscii) = "=" Then
显示 = mCount(数, 计算, True)
End If
FormRecord Format(显示, "0.#######"), 计算
End Sub

Private Sub Form_Load()
Dim iX As Integer, iY As Integer, n As Integer
pX = Screen.TwipsPerPixelX
pY = Screen.TwipsPerPixelY
Me.AutoRedraw = True
Me.KeyPreview = True
Me.FontSize = 12
Me.Caption = "计算器"
For iY = 0 To 2
For iX = 0 To 2
n = n + 1
按钮(iX, iY) = n
Next
Next
按钮(3, 0) = "*"
按钮(3, 1) = "/"
按钮(3, 2) = "-"
按钮(3, 3) = "+"
按钮(0, 3) = "0"
按钮(1, 3) = "."
按钮(2, 3) = "="
显示 = 0
数 = 0
数1 = 0
开始 = True
FormRecord Format(显示, "0.#######"), 计算
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then mMouseMove Button, X, Y
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
mMouseMove Button, X, Y
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)

If X > 240 And X < 1080 And Y > 240 And Y < 600 Then
显示 = 0
数 = 0
数1 = 0
计算 = ""
mXs = False
ElseIf X < 240 Or X > mW - 240 Or Y < 840 Or Y > mH - 240 Then
ElseIf (X - 240) \ bW = 3 Then
显示 = mCount(数, 按钮((X - 240) \ bW, (Y - 840) \ bH))
ElseIf (X - 240) \ bW = 2 And (Y - 840) \ bH = 3 Then
显示 = mCount(数, 计算, True)
ElseIf (X - 240) \ bW = 1 And (Y - 840) \ bH = 3 Then
If Int(显示) = 显示 Then mXs = True
Else
If 开始 Then 数 = 0
If 复位 Then
数1 = 0
计算 = ""
End If
If Len(CStr(Val(显示))) < 8 Then 数 = 数 & IIf(mXs, ".", "") & (按钮((X - 240) \ bW, (Y - 840) \ bH))
显示 = 数
开始 = False
mXs = False
复位 = False
End If
FormRecord Format(显示, "0.#######"), 计算
End Sub

Private Sub Form_Resize()
mW = IIf(Me.ScaleWidth > 3000, Me.ScaleWidth, 3000)
mH = IIf(Me.ScaleHeight > 3000, Me.ScaleHeight, 3000)
bW = (mW - 120) / 4
bH = (mH - 840) / 4
FormRecord Format(显示, "0.#######"), 计算
End Sub

热心网友 时间:2023-10-05 15:35

建议: 四、数据导入和同步
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
刷宝账号注销个人信息还在吗 ...没声音 我可以听到对方说话 但是对方那里却听不到我的 麦克风... 格美台风的路线 台风格美经过哪里 三号台风格美路线 台风格美北上路线 2.制作底面直径为8厘米,高为10厘米的圆柱形茶叶盒,至少需要多少平方厘 ... 茶叶桶的底面直径为十厘米,高为20厘米吧,这样两个茶叶桶又帮装纸装... ...形,底面直径是10cm,这种包装的茶叶按图中所示的方式装入长方体纸箱... ...底面直径是10cm,高是15cm,将12盒这种包装的茶叶按 减速机输入、输出轴的加工工艺 CA6140车床输出轴加工工艺卡 OPPO R15支持录屏功能吗? 小米平板2内置的凌动x5中的英特尔第八代核心显卡和骁龙810内置的adreno430相比,哪个更强 小米平板2与surface booki7版差距大么,哪个好一点?听同学说i7处理器是超低压版,小米 凌动x5z8500和英伟达1哪个好 我网购了一棵两年的白玫瑰花苗和一棵两年的月季,要怎么栽种养活的? 月季小苗种植(心得) 地摊上的月季花苗买了5棵,不知道能不能养的活 月季花花苗是什么样子 藤本月季 和灌木月季 小苗 区别 月季苗买大好还是小好 买了五十元的月季花小苗就活了7棵,沭阳县给补苗吗 月季是小苗容易开花还是大苗容易开花? 月季花,月季花价格,月季花多少钱一只,月季花好养吗 月季卡罗拉小苗多少钱 汉密尔顿手表 和天梭 哪个好 欧米茄和天梭哪个好? 汉密尔顿和天梭哪个好? 精工手表和天梭哪个好 急求 带式输送机传动装置设计 数控车床摆线针减速机输出轴车削加工工艺和输出轴钻削加工等分孔工艺 输出轴齿轮加工工艺设计 输出轴课程设计 约翰迪尔904输出轴说明书 输出轴的技术要求 求一篇:减速器输出轴的设计及其加工工艺设计 的 论文,求原创。 CA6140车床输出轴加工工艺哪里有? 斜齿圆柱齿轮减速器输出轴轴系部件设计的设计说明书与装配图(单级斜齿圆柱齿轮减速器) 减速器装配图,大齿轮零件图和输出轴零件图及对应的说明书, 变速器的核心工艺相关流程和加工方式 专业版win10系统后无法连接远程桌面怎么办 Win10连接失败未进行远程连接,因为远程访问服务器的名称问题没有解决 我的世界国际服怎么装光影 我的世界正版国际服怎么装光影 我的世界国际版那个版本不能开光影 MC怎么安装光影 在苹果电脑上买的正版我的世界国际服,怎么添加光影和Mod包啊,求教! 怎么变白啊? 淘金阁苹果手机可以下载吗?