CODE SNIPPET
Public Class atm
Public Sub countpin()
If txtpin.TextLength > 3 Then
errpro.SetError(txtpin, "Invalid Entry!!! Maximum Entry Reached")
txtpin.Text = txtpin.Text & ""
End If
End Sub
Public Sub btnclick()
If btninsertcard.Text = "Card Inserted" Then
entervalue()
Else
End If
disablebuttons() ' disabling the buttons
End Sub
' declaring a method for entering values e.g pin e.t.c
Sub entervalue()
If txtpin.Text = String.Empty Then
txtpin.Text = Me.ActiveControl.Text
Else
txtpin.Text = txtpin.Text & Me.ActiveControl.Text
End If
If txtpin.Text.Length = 5 Then
MessageBox.Show("Maximum Entry Exceeded", "SkyeBank", MessageBoxButtons.OK, MessageBoxIcon.Information)
txtpin.Text = String.Empty
End If
End Sub
Public Sub disablebuttons()
If txtpin.Text.Length = 4 Then
Else
enablebuttons()
End If
End Sub
Public Sub enablebuttons()
groupboxbtn.Enabled = True
End Sub
Private Sub TimerPendulum_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerPendulum.Tick
txtwelcome.Left = txtwelcome.Left - 1
If txtwelcome.Left = 69 Then
TimerPendulum.Enabled = False
TimerPendulum1.Enabled = True
End If
End Sub
Private Sub TimerPendulum1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerPendulum1.Tick
txtwelcome.Left = txtwelcome.Left + 1
If txtwelcome.Left = 177 Then
TimerPendulum1.Enabled = False
TimerPendulum.Enabled = True
End If
End Sub
Private Sub atm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
txtmainscreen.Visible = False
Me.ActiveControl = btnminus
txtboxstmt.Visible = False
'Panelmain.Visible = False
lblcount.Visible = False
txtpin.Visible = False
txtpin.BackColor = txtboard.BackColor
End Sub
Private Sub TimerChangeColor_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerChangeColor.Tick
lblcount.Text = lblcount.Text + 1
If lblcount.Text = 4 Then
txtChangeColor.BackColor = Color.LightGreen
ElseIf lblcount.Text = 10 Then
txtChangeColor.BackColor = Color.White
TimerChangeColor.Enabled = False
lblcount.Text = 0
TimerChangeColor.Enabled = True
End If
End Sub
Private Sub btnzero_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnzero.Click
btnclick()
' countpin()
End Sub
Private Sub btninsertcard_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btninsertcard.Click
enablebuttons()
' making the textpin visibility to be true...
TimerChangeColor.Enabled = False
txtChangeColor.BackColor = Color.LightGreen
txtwelcome.Visible = False
txtpin.Visible = True
txtpin.Text = String.Empty
txtboxstmt.Visible = True 'making the enter pin stmt visible...
If btninsertcard.Text = "Insert Card" Then
btninsertcard.Text = "Card Inserted"
btninsertcard.Enabled = False
End If
txtpin.Focus()
End Sub
Private Sub btnone_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnone.Click
btnclick()
End Sub
Private Sub btntwo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btntwo.Click
btnclick()
End Sub
Private Sub btnthree_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnthree.Click
btnclick()
End Sub
Private Sub btnfour_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnfour.Click
btnclick()
End Sub
Private Sub btnfive_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnfive.Click
btnclick()
End Sub
Private Sub btnsix_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsix.Click
btnclick()
End Sub
Private Sub btnseven_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnseven.Click
btnclick()
End Sub
Private Sub btneight_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btneight.Click
btnclick()
End Sub
Private Sub btnnine_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnnine.Click
btnclick()
End Sub
Private Sub btncancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncancel.Click
txtwelcome.Visible = True
txtboxstmt.Visible = False
txtpin.Text = String.Empty
txtpin.Visible = False
btninsertcard.Text = "Insert Card"
btninsertcard.Enabled = True
TimerChangeColor.Enabled = True
End Sub
End Class
________________________________________________________
....Just Snippet; need the full atm design? feel free to reach me