이거 만드는게 이렇게 어려운 거였나..
소스코드 같이 올려드립니다.
Public Class Form1 Dim Temp As Double 'Temp 변�� 선언(임시저장 공간) Dim Total As Double 'Total 변�� 선언(사칙연산 총 합) Dim Plus As Boolean '덧셈 구분��기 위해 변�� 선언 Dim Minus As Boolean '뺄셈 구분��기 위해 변�� 선언 Dim Multiple As Boolean '곱셈 구분��기 위해 변�� 선언 Dim Division As Boolean '��눗셈 구분��기 위해 변�� 선언 Dim a As Char Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If txtbox.Text = 0 Then txtbox.Clear() End If txtbox.Text = txtbox.Text & 1 End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If txtbox.Text = 0 Then txtbox.Clear() End If txtbox.Text = txtbox.Text & 2 End Sub Private Sub 종료ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 종료ExitToolStripMenuItem.Click End End Sub Private Sub 만든이ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 만든이ToolStripMenuItem.Click MessageBox.Show(" 200730117 박천주 ", "만든이") End Sub Private Sub 설명서ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 설명서ToolStripMenuItem.Click MessageBox.Show("'0.1~0.9는 계산이 안됩니다^^", "설명서") End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If txtbox.Text = 0 Then txtbox.Clear() End If txtbox.Text = txtbox.Text & 3 End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click If txtbox.Text = 0 Then txtbox.Clear() End If txtbox.Text = txtbox.Text & 4 End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click If txtbox.Text = 0 Then txtbox.Clear() End If txtbox.Text = txtbox.Text & 5 End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If txtbox.Text = 0 Then txtbox.Clear() End If txtbox.Text = txtbox.Text & 6 End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If txtbox.Text = 0 Then txtbox.Clear() End If txtbox.Text = txtbox.Text & 7 End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click If txtbox.Text = 0 Then txtbox.Clear() End If txtbox.Text = txtbox.Text & 8 End Sub Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click If txtbox.Text = 0 Then txtbox.Clear() End If txtbox.Text = txtbox.Text & 9 End Sub Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click If txtbox.Text = 0 Then txtbox.Clear() End If txtbox.Text = txtbox.Text & 0 End Sub Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click txtbox.Text = txtbox.Text & "." End Sub Private Sub Button17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button17.Click txtbox.Text = 0 Temp = 0 Total = 0 End Sub Private Sub Form_Load() End Sub Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click If txtbox.Text = "" Then MsgBox("숫자를 입력해 주세요.") Else Plus = True Minus = False Multiple = False Division = False Temp = txtbox.Text txtbox.Text = 0 End If End Sub Private Sub Button19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button19.Click If Plus = True Then Total = Temp + txtbox.Text Plus = False ElseIf Minus = True Then Total = Temp - txtbox.Text Minus = False ElseIf Multiple = True Then Total = Temp * txtbox.Text Multiple = False ElseIf Division = True Then Total = Temp / txtbox.Text Division = False End If txtbox.Text = Total End Sub Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click If txtbox.Text = "" Then MsgBox("숫자를 입력해 주세요") Else Plus = False Multiple = False Minus = True Division = False Temp = txtbox.Text txtbox.Text = 0 End If End Sub Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click If txtbox.Text = "" Or 0 Then MsgBox("숫자를 입력해 주세요") Else Plus = False Multiple = True Minus = False Division = False Temp = txtbox.Text txtbox.Text = 0 End If End Sub Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click If txtbox.Text = "" Or 0 Then MsgBox("숫자를 입력해 주세요") Else Plus = False Multiple = False Minus = False Division = True Temp = txtbox.Text txtbox.Text = 0 End If End Sub Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click 'MsgBox("��정중...") Dim Temp2 As String Temp2 = txtbox.Text() Temp2 = Temp2.Substring(0, Temp2.Length() - 1) txtbox.Text = Temp2 If txtbox.Text = "" Or 0 Then txtbox.Text = 0 End If End Sub End Class
'IT Data > 사용설명서' 카테고리의 다른 글
흑룡의해! 연도와 십이지가 뜻하는 특별한 의미? (0) | 2011.12.30 |
---|---|
2011.10.17 베가레이서 업데이트 ! ( 1.37ver ) (0) | 2011.10.17 |
포켓몬스터 골드버전 공략 !! (안드로이드 스마트폰) (3) | 2011.10.15 |
스키마(schema)란 무엇인가? (0) | 2011.10.12 |
2011.9.26. 베가레이서 업데이트 (ver 1.34) (1) | 2011.09.27 |