久违的--大二下学期第一章

来源:互联网 发布:淘宝客助手破解版 编辑:程序博客网 时间:2024/05/19 22:51
Imports System.MathPublic Class Form1    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click        Dim h%, m%, s%, x%        x = Val(TextBox1.Text)        s = x Mod 60        m = (x \ 60) Mod 60        h = x \ 3600        Label2.Text = h & ":" & m & ":" & s    End Sub    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click        Me.Height = 250    End Sub    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click        Me.Height = 400    End Sub    Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click        Dim c As Char        c = Trim(ComboBox1.Text)        Select Case c            Case "+"                TextBox4.Text = Val(TextBox2.Text) + Val(TextBox3.Text)            Case "-"                TextBox4.Text = Val(TextBox2.Text) - Val(TextBox3.Text)            Case "*"                TextBox4.Text = Val(TextBox2.Text) * Val(TextBox3.Text)            Case "/"                TextBox4.Text = Val(TextBox2.Text) / Val(TextBox3.Text)        End Select    End Sub    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click        TextBox6.Text = Sin(Val(TextBox5.Text))    End Sub    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click        TextBox6.Text = Sqrt(Val(TextBox5.Text))    End Sub    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click        TextBox6.Text = Oct(Val(TextBox5.Text))    End Sub    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click        TextBox6.Text = Cos(Val(TextBox5.Text))    End Sub    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click        TextBox6.Text = Log(Val(TextBox5.Text))    End Sub    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click        TextBox6.Text = Hex(Val(TextBox5.Text))    End Sub    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click        Dim i As Integer, c As Char        Randomize()        Label4.Text = ""        For i = 1 To 10            Label4.Text &= Chr(Int(Rnd() * 26 + 65)) & " "        Next    End SubEnd Class


好久不写,感觉手生了不少

赶紧捡起节操。久违了-CSDN

0 0
原创粉丝点击