Anda di halaman 1dari 9

VERSION 5.00 Begin VB.

Form Calculator Caption = "Calculator" ClientHeight = 4335 ClientLeft = 3255 ClientTop = 2145 ClientWidth = 3510 LinkTopic = "Form2" PaletteMode = 1 'UseZOrder ScaleHeight = 4335 ScaleWidth = 3510 Begin VB.CommandButton cmdPower Caption = "ON/OFF" Height = 560 Left = 2160 TabIndex = 18 Top = 960 Width = 1095 End Begin VB.CommandButton cmdMSubtract Caption = "M-" Height = 495 Left = 2760 TabIndex = 17 Top = 2280 Width = 495 End Begin VB.CommandButton cmdMAdd Caption = "M+" Height = 495 Left = 2760 TabIndex = 16 Top = 2880 Width = 495 End Begin VB.CommandButton cmdMRecall Caption = "M"
open in browser PRO version
Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Height Left TabIndex Top Width

= = = = =

495 2760 15 1680 495 cmdTotal "=" 495 2160 14 3480 1095 cmdAdd "+" 495 2160 13 2880 495 cmdSubtract "-" 495 2160 12 2280 495 cmdClear "C" 495 2160 11 1680 495
pdfcrowd.com

End Begin VB.CommandButton Caption = Height = Left = TabIndex = Top = Width = End Begin VB.CommandButton Caption = Height = Left = TabIndex = Top = Width = End Begin VB.CommandButton Caption = Height = Left = TabIndex = Top = Width = End Begin VB.CommandButton Caption = Height = Left = TabIndex = Top = Width = End
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

End Begin VB.CommandButton Caption = Height = Index = Left = TabIndex = Top = Width = End Begin VB.CommandButton Caption = Height = Index = Left = TabIndex = Top = Width = End Begin VB.CommandButton Caption = Height = Index = Left = TabIndex = Top = Width = End Begin VB.CommandButton Caption = Height = Index = Left = TabIndex = Top = Width = End Begin VB.CommandButton
open in browser PRO version

cmdNumber "0" 495 0 840 10 3480 495 cmdNumber "9" 495 9 1440 9 1680 495 cmdNumber "8" 495 8 840 8 1680 495 cmdNumber "7" 495 7 240 7 1680 495 cmdNumber
pdfcrowd.com

Are you a developer? Try out the HTML to PDF API

Caption Height Index Left TabIndex Top Width

= = = = = = =

"6" 495 6 1440 6 2280 495 cmdNumber "5" 495 5 840 5 2280 495 cmdNumber "4" 495 4 240 4 2280 495 cmdNumber "3" 495 3 1440 3 2880 495 cmdNumber "2" 495
pdfcrowd.com

End Begin VB.CommandButton Caption = Height = Index = Left = TabIndex = Top = Width = End Begin VB.CommandButton Caption = Height = Index = Left = TabIndex = Top = Width = End Begin VB.CommandButton Caption = Height = Index = Left = TabIndex = Top = Width = End Begin VB.CommandButton Caption = Height =
open in browser PRO version

Are you a developer? Try out the HTML to PDF API

Height Index Left TabIndex Top Width

= = = = = =

495 2 840 2 2880 495

End Begin VB.CommandButton cmdNumber Caption = "1" Height = 495 Index = 1 Left = 240 TabIndex = 1 Top = 2880 Width = 495 End Begin VB.TextBox txtDisplay Alignment = 1 'Right Justify BeginProperty Font Name = "MS Sans Serif" Size = 16.5 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 555 Left = 240 TabIndex = 0 Top = 960 Width = 1695 End Begin VB.Label Label1 Alignment = 2 'Center Caption = "CALCULATOR APPLET" BeginProperty Font
open in browser PRO version
Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Name Size Charset Weight Underline Italic Strikethrough EndProperty Height = Left = TabIndex = Top = Width =

= = = = = = =

"MS 12 0 700 0 0 0 255 240 19 360 3015

Sans Serif"

'False 'False 'False

End End Attribute VB_Name = "Calculator" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Const NUMBER As Integer = -1 Const CLEAR As Integer = 0 Const ADD As Integer = 1 Const SUBTRACT As Integer = 2 Const TOTAL As Integer = 3 Const MEMORY As Integer = 4 Const OFFMSG As String = "Power Off" Dim nValue As Integer Dim nTotal As Integer Dim nMemory As Integer Dim nAction As Integer Dim nPrevious As Integer Dim bOn As Boolean Sub Calculate() nValue = Val(txtDisplay.Text)
open in browser PRO version
Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

If (nAction = ADD) Then nTotal = nTotal + nValue ElseIf (nAction = SUBTRACT) Then nTotal = nTotal - nValue Else nTotal = nValue End If txtDisplay.Text = Str(nTotal) End Sub Sub KeyPressed(szKey As String) If bOn Then If (nPrevious = NUMBER) Then txtDisplay.Text = txtDisplay.Text + szKey Else txtDisplay.Text = szKey End If nPrevious = NUMBER End If End Sub Private Sub cmdAdd_Click() If bOn Then Calculate nPrevious = ADD nAction = ADD End If End Sub Private Sub cmdClear_Click() If bOn Then nValue = 0 nTotal = 0 nMemory = 0
open in browser PRO version
Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

txtDisplay.Text = Str(nTotal) nPrevious = CLEAR nAction = CLEAR End If End Sub Private Sub cmdMAdd_Click() If bOn Then nMemory = nMemory + Val(txtDisplay.Text) nPrevious = MEMORY End If End Sub Private Sub cmdMRecall_Click() If bOn Then txtDisplay.Text = Str(nMemory) nPrevious = MEMORY End If End Sub Private Sub cmdMSubtract_Click() If bOn Then nMemory = nMemory - Val(txtDisplay.Text) nPrevious = MEMORY End If End Sub Private Sub cmdNumber_Click(Index As Integer) KeyPressed CStr(Index) End Sub Private Sub cmdPower_Click() If bOn Then txtDisplay.Text = OFFMSG bOn = False Else txtDisplay.Text = " 0" bOn = True
open in browser PRO version
Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

bOn = True End If nMemory = 0 nTotal = 0 nValue = 0 End Sub Private Sub cmdSubtract_Click() If bOn Then Calculate nPrevious = SUBTRACT nAction = SUBTRACT End If End Sub Private Sub cmdTotal_Click() If bOn Then Calculate nPrevious = TOTAL nAction = TOTAL End If End Sub Private Sub Form_Load() txtDisplay.Locked = True txtDisplay.Text = "Power Off" End Sub

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

pdfcrowd.com

Anda mungkin juga menyukai