求vb高手设计一下下面的题

小学数学四则运算知识点:1)文件操作2)定长字符串的使用3)列表框控件常用内部控件的使用1、题目介绍:设计一个由计算机来当小学低年级学生算术老师的VB应用程序,要求给出一... 小学数学四则运算
知识点: 1)文件操作
2)定长字符串的使用
3)列表框控件常用内部控件的使用
1、题目介绍:
设计一个由计算机来当小学低年级学生算术老师的VB应用程序,要求给出一系列的两个数的四则运算的算术题,学生输入该题的答案,计算机根据学生的答案判断正确与否,并给出成绩,可保存练习记录。单击结束命令按钮,退出应用程序。
2、功能需求
1)启动程序,出现主界面。
2)可选择题量、数的范围、运算规则,点击答题开始。
3)运算规则选择“混合”,则加减乘除随机出现。
4)判定答题结果,错误则给出答案。
5)给出答题统计结果,并可实现保存。
6)答题过程中不允许退出。
3、扩展程序功能
根据答题的正确率给出表扬或鼓励的相关信息
做完可以发我邮箱634025082@qq.com
展开
 我来答
850842614
2012-06-05 · 超过11用户采纳过TA的回答
知道答主
回答量:69
采纳率:0%
帮助的人:32.1万
展开全部
20RMB+200QB。程序简单,但工作量多、
Option Explicit

Dim VBS As New MSScriptControl.ScriptControl
Dim tempAnswerD As Double
Dim tempAnswer As Double
Dim tempAnswerI As Double
Dim NCount As Long
Dim SumCount As Long
Dim Sum1 As Long
Dim Sum2 As Long
Dim MixOp(0 To 4) As String
Dim RightCount As Long
Dim ErrorCount As Long

Private Sub Command1_Click()
If SumCount < NCount Then MsgBox "这轮测试还没结束!": Exit Sub
If Not IsNumeric(Trim(Text1.Text)) Or Trim(Text1.Text) = "" Then MsgBox "请正确输入!": Exit Sub
If Not IsNumeric(Trim(Text2.Text)) Or Trim(Text2.Text) = "" Then MsgBox "请正确输入!": Exit Sub
If Not IsNumeric(Trim(Text3.Text)) Or Trim(Text3.Text) = "" Then MsgBox "请正确输入!": Exit Sub
If CInt(Text2.Text) >= CInt(Text3.Text) Then MsgBox "请注意范围!": Exit Sub
NCount = CInt(Text1.Text)

getQues

End Sub
Private Sub Command2_Click()

If Not IsNumeric(Text4.Text) Or Trim(Text4.Text) = "" Then
MsgBox "请输入数字答案!": Exit Sub
End If
If InStr(1, tempAnswer, ".") Then
If Round(Text4.Text, 2) = tempAnswerD Then
MsgBox "输入答案正确!"
RightCount = RightCount + 1
Else
MsgBox "输入答案错误!正确答案:" & tempAnswerD & ""

ErrorCount = ErrorCount + 1
End If
Else
If CInt(Text4.Text) = tempAnswerI Then
MsgBox "输入答案正确!"
RightCount = RightCount + 1
Else

MsgBox "输入答案错误!正确答案:" & tempAnswerI & ""
ErrorCount = ErrorCount + 1
End If

End If

SumCount = SumCount + 1
Text4.Text = ""
getQues

End Sub

Private Sub Form_Load()
SkinH_AttachEx "C:\ap\C_~_SKIN\aero.she", ""
VBS.Language = "VBScript"

Combo1.AddItem "+"
Combo1.AddItem "-"
Combo1.AddItem "*"
Combo1.AddItem "/"
Combo1.AddItem "混合"

MixOp(1) = "笑轮+"
MixOp(2) = "-"
MixOp(3) = "*"迟扮
MixOp(4) = "/"
MixOp(0) = "+"
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

If SumCount < NCount Then Cancel = 1: MsgBox "测试没有结束,不能关闭"
setlog "总共答题" & SumCount & "碰旦信" & "正确" & RightCount & "错误" & ErrorCount

End Sub
’‘’‘’‘’‘’‘’‘模块

Option Explicit

Public Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Public Declare Function SkinH_Attach Lib "SkinH_VB6.dll" () As Long
Public Declare Function SkinH_AttachEx Lib "SkinH_VB6.dll" (ByVal lpSkinFile As String, ByVal lpPasswd As String) As Long
Public Declare Function SkinH_AttachExt Lib "SkinH_VB6.dll" (ByVal lpSkinFile As String, ByVal lpPasswd As String, ByVal nHue As Integer, ByVal nSat As Integer, ByVal nBri As Integer) As Long
Public Declare Function SkinH_AttachRes Lib "SkinH_VB6.dll" (lpRes As Any, ByVal nSize As Long, ByVal lpPasswd As String, ByVal nHue As Integer, ByVal nSat As Integer, ByVal nBri As Integer) As Long
Public Declare Function SkinH_AdjustHSV Lib "SkinH_VB6.dll" (ByVal nHue As Integer, ByVal nSat As Integer, ByVal nBri As Integer) As Long
Public Declare Function SkinH_Detach Lib "SkinH_VB6.dll" () As Long
Public Declare Function SkinH_DetachEx Lib "SkinH_VB6.dll" (ByVal hWnd As Long) As Long
Public Declare Function SkinH_SetAero Lib "SkinH_VB6.dll" (ByVal hWnd As Long) As Long
Public Declare Function SkinH_SetWindowAlpha Lib "SkinH_VB6.dll" (ByVal hWnd As Long, ByVal nAlpha As Integer) As Long
Public Declare Function SkinH_SetMenuAlpha Lib "SkinH_VB6.dll" (ByVal nAlpha As Integer) As Long
Public Declare Function SkinH_GetColor Lib "SkinH_VB6.dll" (ByVal hWnd As Long, ByVal nPosX As Integer, ByVal nPosY As Integer) As Long
Public Declare Function SkinH_Map Lib "SkinH_VB6.dll" (ByVal hWnd As Long, ByVal nType As Integer) As Long
Public Declare Function SkinH_LockUpdate Lib "SkinH_VB6.dll" (ByVal hWnd As Long, ByVal nLocked As Integer) As Long
Public Declare Function SkinH_SetBackColor Lib "SkinH_VB6.dll" (ByVal hWnd As Long, ByVal nRed As Integer, ByVal nGreen As Integer, ByVal nBlue As Integer) As Long
Public Declare Function SkinH_SetForeColor Lib "SkinH_VB6.dll" (ByVal hWnd As Long, ByVal nRed As Integer, ByVal nGreen As Integer, ByVal nBlue As Integer) As Long
Public Declare Function SkinH_SetWindowMovable Lib "SkinH_VB6.dll" (ByVal hWnd As Long, ByVal bMove As Integer) As Long
Public Declare Function SkinH_AdjustAero Lib "SkinH_VB6.dll" (ByVal nAlpha As Integer, ByVal nShwDark As Integer, ByVal nShwSharp As Integer, ByVal nShwSize As Integer, ByVal nX As Integer, ByVal nY As Integer, ByVal nRed As Integer, ByVal nGreen As Integer, ByVal nBlue As Integer) As Long
Public Declare Function SkinH_NineBlt Lib "SkinH_VB6.dll" (ByVal hDtDC As Long, ByVal left As Integer, ByVal top As Integer, ByVal right As Integer, ByVal bottom As Integer, ByVal nMRect As Integer) As Long
Public Declare Function SkinH_SetTitleMenuBar Lib "SkinH_VB6.dll" (ByVal hWnd As Long, ByVal bEnable As Integer, ByVal nMenuY As Integer, ByVal nTopOffs As Integer, ByVal nRightOffs As Integer) As Long
Public Declare Function SkinH_SetFont Lib "SkinH_VB6.dll" (ByVal hWnd As Long, ByVal hFont As Long) As Long
Public Declare Function SkinH_SetFontEx Lib "SkinH_VB6.dll" (ByVal hWnd As Long, ByVal szFace As String, ByVal nHeight As Integer, ByVal nWidth As Integer, ByVal nWeight As Integer, ByVal nItalic As Integer, ByVal nUnderline As Integer, ByVal nStrikeOut As Integer) As Long
Public Declare Function SkinH_VerifySign Lib "SkinH_VB6.dll" () As Long

'
'SkinH_AttachEx "C:\ap\C_~_SKIN\skinh.she", ""
'SkinH_SetTitleMenuBar Me.hWnd, 1, 0, 0, 0

Sub CHSkin(cd1 As CommonDialog)
Dim sFile As String

With cd1
.InitDir = "C:\Ap\C_~_Skin"
.DialogTitle = "Open"
.CancelError = False
.Filter = "SkinSharp Skin File (*.she)|*.she"
.ShowOpen
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With

SkinH_AttachEx sFile, ""
End Sub

Function setlog(Str, Optional FileName As String = "")
''If Check1.Value <> 0 Then
' List1.AddItem Format(Now, "d hh:mm") & " " & Str, 0
' If List1.ListCount > 100 Then List1.RemoveItem 100
''End If
Dim Fn As String
Fn = App.Path & "\Log" & Format(Now, "yyyymmdd") & " " & "" & FileName & ".ini"

Open Fn For Append As #1
Print #1, Format(Now, "yyyy-mm-dd hh:mm:ss") & " " & Str 'qq'''qqqqqqqqq
Close #1

End Function
天涯客家学子
2012-06-05 · TA获得超过242个赞
知道小有建树答主
回答量:392
采纳率:100%
帮助的人:187万
展开全部
做一个程序,恐怕没有人肯无偿付出的。
追问
帮我做好我给10q币
追答
为啥是Q币啊?我不是不会做,是不想做,你这个就是个小小程序。我一直做软件开发的,现在回想起来,做程序太苦了,如果你要是有代码,我给你检查错误,那简单些,要重新写代码的话,没有动力啊。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
百度网友1cc7418ada
2012-06-05 · TA获得超过270个赞
知道小有建树答主
回答量:886
采纳率:0%
帮助的人:337万
展开全部
上威客网给钱人家帮你做这个吧
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
最伤卉553
2012-06-09 · TA获得超过6.3万个赞
知道大有可为答主
回答量:4万
采纳率:0%
帮助的人:5750万
展开全部
星星为什么是白色
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式