| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3377 人关注过本帖
标题:新手小学生求教!
只看楼主 加入收藏
时沙丶
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2016-10-7
收藏
 问题点数:0 回复次数:6 
新手小学生求教!
做一个最基本标签代码,要求如下:
实现标签沿窗体内侧按顺时针方向自动运行;
做一个动态变换按钮:
(1)按钮位置随机变换; (2)按钮大小随机变换; (3)按钮背景颜色随机变换
做一个计算器:
    实现智能计算器的设计,主要实现小学数学智能运算。
跪求各位大神!在此先行谢过!蓝瘦!香菇!!!
搜索更多相关主题的帖子: 计算器 小学生 小学数学 顺时针 标签 
2016-10-12 22:17
益达炒鸡蛋
Rank: 2
等 级:禁止发言
帖 子:15
专家分:21
注 册:2016-10-30
收藏
得分:0 
提示: 作者被禁止或删除 内容自动屏蔽
2016-10-30 16:06
祝凯迪
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:3
帖 子:20
专家分:43
注 册:2016-9-6
收藏
得分:0 
现在小学都学了吗
2016-10-31 03:55
FizzyElf
Rank: 2
等 级:论坛游民
帖 子:14
专家分:15
注 册:2016-6-2
收藏
得分:0 
Public Class Form1
    Dim strmiddle() As String = {"0", "0", "0"}
    Dim calmethod1 As String = "0"
    Dim calmethod2 As String = "0"
    Dim strdot As Boolean = False

    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
        If strmiddle(0) = "0" Then
            TextBox1.Text = strmiddle(0) & "."
        ElseIf strdot = False Then
            strmiddle(0) = strmiddle(0) & "0"
            TextBox1.Text = strmiddle(0) & "."
        Else
            strmiddle(0) = strmiddle(0) & "0"
            TextBox1.Text = strmiddle(0)
        End If
    End Sub

    Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
        strdot = True
        strmiddle(0) = strmiddle(0) & "."
        TextBox1.Text = strmiddle(0)
    End Sub

    Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click
        strmiddle(0) = "0"
        strmiddle(1) = "0"
        strmiddle(2) = "0"
        calmethod1 = "0"
        calmethod2 = "0"
        strdot = False
        TextBox1.Text = "0."
    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        If strmiddle(0) = "0" Then
            strmiddle(0) = "1"
            TextBox1.Text = strmiddle(0) & "."
        ElseIf strdot = False Then
            strmiddle(0) = strmiddle(0) & "1"
            TextBox1.Text = strmiddle(0) & "."
        Else
            strmiddle(0) = strmiddle(0) & "1"
            TextBox1.Text = strmiddle(0)
        End If
    End Sub

    Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
        If strmiddle(0) = "0" Then
            strmiddle(0) = "2"
            TextBox1.Text = strmiddle(0) & "."
        ElseIf strdot = False Then
            strmiddle(0) = strmiddle(0) & "2"
            TextBox1.Text = strmiddle(0) & "."
        Else
            strmiddle(0) = strmiddle(0) & "2"
            TextBox1.Text = strmiddle(0)
        End If
    End Sub

    Private Sub Button11_Click(sender As Object, e As EventArgs) Handles Button11.Click
        If strmiddle(0) = "0" Then
            strmiddle(0) = "3"
            TextBox1.Text = strmiddle(0) & "."
        ElseIf strdot = False Then
            strmiddle(0) = strmiddle(0) & "3"
            TextBox1.Text = strmiddle(0) & "."
        Else
            strmiddle(0) = strmiddle(0) & "3"
            TextBox1.Text = strmiddle(0)
        End If
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        If strmiddle(0) = "0" Then
            strmiddle(0) = "4"
            TextBox1.Text = strmiddle(0) & "."
        ElseIf strdot = False Then
            strmiddle(0) = strmiddle(0) & "4"
            TextBox1.Text = strmiddle(0) & "."
        Else
            strmiddle(0) = strmiddle(0) & "4"
            TextBox1.Text = strmiddle(0)
        End If
    End Sub

    Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
        If strmiddle(0) = "0" Then
            strmiddle(0) = "5"
            TextBox1.Text = strmiddle(0) & "."
        ElseIf strdot = False Then
            strmiddle(0) = strmiddle(0) & "5"
            TextBox1.Text = strmiddle(0) & "."
        Else
            strmiddle(0) = strmiddle(0) & "5"
            TextBox1.Text = strmiddle(0)
        End If
    End Sub

    Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click
        If strmiddle(0) = "0" Then
            strmiddle(0) = "6"
            TextBox1.Text = strmiddle(0) & "."
        ElseIf strdot = False Then
            strmiddle(0) = strmiddle(0) & "6"
            TextBox1.Text = strmiddle(0) & "."
        Else
            strmiddle(0) = strmiddle(0) & "6"
            TextBox1.Text = strmiddle(0)
        End If
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If strmiddle(0) = "0" Then
            strmiddle(0) = "7"
            TextBox1.Text = strmiddle(0) & "."
        ElseIf strdot = False Then
            strmiddle(0) = strmiddle(0) & "7"
            TextBox1.Text = strmiddle(0) & "."
        Else
            strmiddle(0) = strmiddle(0) & "7"
            TextBox1.Text = strmiddle(0)
        End If
    End Sub

    Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
        If strmiddle(0) = "0" Then
            strmiddle(0) = "8"
            TextBox1.Text = strmiddle(0) & "."
        ElseIf strdot = False Then
            strmiddle(0) = strmiddle(0) & "8"
            TextBox1.Text = strmiddle(0) & "."
        Else
            strmiddle(0) = strmiddle(0) & "8"
            TextBox1.Text = strmiddle(0)
        End If
    End Sub

    Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
        If strmiddle(0) = "0" Then
            strmiddle(0) = "9"
            TextBox1.Text = strmiddle(0) & "."
        ElseIf strdot = False Then
            strmiddle(0) = strmiddle(0) & "9"
            TextBox1.Text = strmiddle(0) & "."
        Else
            strmiddle(0) = strmiddle(0) & "9"
            TextBox1.Text = strmiddle(0)
        End If
    End Sub

    Private Sub Button13_Click(sender As Object, e As EventArgs) Handles Button13.Click
        TextBox1.Text = "0"
    End Sub

    Private Sub Button16_Click(sender As Object, e As EventArgs) Handles Button16.Click
        Me.Close()
    End Sub

    Private Sub Button14_Click(sender As Object, e As EventArgs) Handles Button14.Click
        If calmethod1 = "0" Then
            calmethod1 = "*"
            strmiddle(1) = strmiddle(0)
            strmiddle(0) = "0"
        Else : Select Case calmethod1
                Case "+"
                    calmethod2 = "*"
                    strmiddle(2) = strmiddle(0)
                    strmiddle(0) = "0"
                Case "-"
                    calmethod2 = "*"
                    strmiddle(2) = strmiddle(0)
                    strmiddle(0) = "0"
                Case "*"
                    strmiddle(1) = Str(Val(strmiddle(0)) * Val(strmiddle(1)))
                    strmiddle(0) = "0"
                    calmethod1 = "*"
                Case "/"
                    strmiddle(1) = Str(Val(strmiddle(1)) / Val(strmiddle(0)))
                    strmiddle(0) = "0"
                    calmethod1 = "*"
            End Select
        End If
    End Sub

    Private Sub Button17_Click(sender As Object, e As EventArgs) Handles Button17.Click
        If calmethod1 = "0" Then
            calmethod1 = "/"
            strmiddle(1) = strmiddle(0)
            strmiddle(0) = "0"
        Else : Select Case calmethod1
                Case "+"
                    calmethod2 = "/"
                    strmiddle(2) = strmiddle(0)
                    strmiddle(0) = "0"
                Case "-"
                    calmethod2 = "/"
                    strmiddle(2) = strmiddle(0)
                    strmiddle(0) = "0"
                Case "*"
                    strmiddle(1) = Str(Val(strmiddle(0)) * Val(strmiddle(1)))
                    strmiddle(0) = "0"
                    calmethod1 = "/"
                Case "/"
                    strmiddle(1) = Str(Val(strmiddle(1)) / Val(strmiddle(0)))
                    strmiddle(0) = "0"
                    calmethod1 = "/"
            End Select
        End If
    End Sub

    Private Sub Button15_Click(sender As Object, e As EventArgs) Handles Button15.Click
        If calmethod1 = "0" Then
            calmethod1 = "+"
            strmiddle(1) = strmiddle(0)
            strmiddle(0) = "0"
        Else : Select Case calmethod1
                Case "+"
                    strmiddle(1) = Str(Val(strmiddle(0)) + Val(strmiddle(1)))
                    strmiddle(0) = "0"
                    calmethod1 = "+"
                Case "-"
                    strmiddle(1) = Str(Val(strmiddle(1)) - Val(strmiddle(0)))
                    strmiddle(0) = "0"
                    calmethod1 = "+"
                Case "*"
                    strmiddle(1) = Str(Val(strmiddle(0)) * Val(strmiddle(1)))
                    strmiddle(0) = "0"
                    calmethod1 = "+"
                Case "/"
                    strmiddle(1) = Str(Val(strmiddle(1)) / Val(strmiddle(0)))
                    strmiddle(0) = "0"
                    calmethod1 = "+"
            End Select
        End If
    End Sub

    Private Sub Button18_Click(sender As Object, e As EventArgs) Handles Button18.Click
        If calmethod1 = "0" Then
            calmethod1 = "-"
            strmiddle(1) = strmiddle(0)
            strmiddle(0) = "0"
        Else : Select Case calmethod1
                Case "+"
                    strmiddle(1) = Str(Val(strmiddle(0)) + Val(strmiddle(1)))
                    strmiddle(0) = "0"
                    calmethod1 = "-"
                Case "-"
                    strmiddle(1) = Str(Val(strmiddle(1)) - Val(strmiddle(0)))
                    strmiddle(0) = "0"
                    calmethod1 = "-"
                Case "*"
                    strmiddle(1) = Str(Val(strmiddle(0)) * Val(strmiddle(1)))
                    strmiddle(0) = "0"
                    calmethod1 = "-"
                Case "/"
                    strmiddle(1) = Str(Val(strmiddle(1)) / Val(strmiddle(0)))
                    strmiddle(0) = "0"
                    calmethod1 = "-"
            End Select
        End If
    End Sub

    Private Sub Button19_Click(sender As Object, e As EventArgs) Handles Button19.Click
        If strmiddle(2) = "0" Then
            Select Case calmethod1
                Case "+"
                    TextBox1.Text = Str(Val(strmiddle(1)) + Val(strmiddle(0)))
                Case "-"
                    TextBox1.Text = Str(Val(strmiddle(1)) - Val(strmiddle(0)))
                Case "*"
                    TextBox1.Text = Str(Val(strmiddle(1)) * Val(strmiddle(0)))
                Case "/"
                    If strmiddle(0) = "0" Then
                        TextBox1.Text = "error!"
                    Else
                        TextBox1.Text = Str(Val(strmiddle(1)) + Val(strmiddle(0)))
                    End If
            End Select
        ElseIf calmethod2 = "*" Then
            strmiddle(0) = Str(Val(strmiddle(0)) + Val(strmiddle(2)))
            Select Case calmethod1
                Case "+"
                    TextBox1.Text = Str(Val(strmiddle(1)) + Val(strmiddle(0)))
                Case "-"
                    TextBox1.Text = Str(Val(strmiddle(1)) - Val(strmiddle(0)))
                Case "*"
                    TextBox1.Text = Str(Val(strmiddle(1)) * Val(strmiddle(0)))
                Case "/"
                    If strmiddle(0) = "0" Then
                        TextBox1.Text = "error!"
                    Else
                        TextBox1.Text = Str(Val(strmiddle(1)) + Val(strmiddle(0)))
                    End If
            End Select
        Else : calmethod2 = "/"
            strmiddle(0) = Str(Val(strmiddle(2)) + Val(strmiddle(0)))
            Select Case calmethod1
                Case "+"
                    TextBox1.Text = Str(Val(strmiddle(1)) + Val(strmiddle(0)))
                Case "-"
                    TextBox1.Text = Str(Val(strmiddle(1)) - Val(strmiddle(0)))
                Case "*"
                    TextBox1.Text = Str(Val(strmiddle(1)) * Val(strmiddle(0)))
                Case "/"
                    If strmiddle(0) = "0" Then
                        TextBox1.Text = "error!"
                    Else
                        TextBox1.Text = Str(Val(strmiddle(1)) + Val(strmiddle(0)))
                    End If
            End Select
        End If
    End Sub
End Class

O(∩_∩)O
2016-11-01 20:16
FizzyElf
Rank: 2
等 级:论坛游民
帖 子:14
专家分:15
注 册:2016-6-2
收藏
得分:0 
回复 4楼 FizzyElf
计算器

O(∩_∩)O
2016-11-01 20:17
时沙丶
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2016-10-7
收藏
得分:0 
回复 3楼 祝凯迪
计算机火了
2016-11-04 17:17
时沙丶
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2016-10-7
收藏
得分:0 
回复 4楼 FizzyElf
厉害我Word哥
2016-11-04 17:18
快速回复:新手小学生求教!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.074889 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved