-
February 20th, 2012, 08:15 PM
#1
VB.NET Windows form app (ATM) Help
Hi, iv'e been ask to do an atm app.
Really simple:
Username:
Password:
OK (Button) Exit (button)
With 3 options:
Deposit:
Withdraw:
Balance:
I did the form design, but i don't know where to star the code
Please help i'm new at this.
Sorry for my bad English.
-
February 20th, 2012, 08:54 PM
#2
Re: VB.NET Windows form app (ATM) Help
Start with writing code to verify the user and password then add code for the math required for the changes and then the display
Always use [code][/code] tags when posting code.
-
February 20th, 2012, 09:29 PM
#3
Re: VB.NET Windows form app (ATM) Help
ok i started by filling user and pass press the ok button when those are filled the options appear(deposit, balance..) if not a messagebox says please enter user...
but i'm having trouble with the code since i dont know how get value from the textbox
what do i need to code to get that when i pressed the ok button
-
February 20th, 2012, 10:43 PM
#4
Re: VB.NET Windows form app (ATM) Help
if your textbox has the default name of TextBox1 then you would get the value by using TextBox1.Text If you named the textbox yourself then use whatever name you gave it in place of the TextBox1 portion. the .Text property lets you get or set the text in the control.
Always use [code][/code] tags when posting code.
-
February 20th, 2012, 11:05 PM
#5
Re: VB.NET Windows form app (ATM) Help
I DID IT, THANKS
I DID SOME RESEARCH.
ITS NOT THAT COMPLEX BUT HERE IT IS TO SHARE IT.
Public Class Form1
Private Sub btnok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnok.Click
If txtname.Text = "" And txtpass.Text = "" Then
MessageBox.Show("Enter Username and Password", "Message")
Else
lbldep.Visible = True
lblw.Visible = True
lblbal.Visible = True
txtbal.Visible = True
txtdep.Visible = True
txtw.Visible = True
btncont.Visible = True
End If
End Sub
Private Sub btncont_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncont.Click
btnprint.Visible = True
If txtdep.Text = "" And txtw.Text = "" Then
MessageBox.Show("Enter Amount", "Message")
Else
Dim balance As Integer
balance = Val(txtdep.Text) - Val(txtw.Text)
txtbal.Text = balance
End If
End Sub
Private Sub btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexit.Click
Dim retCode As Integer = 0
System.Environment.Exit(retCode)
End Sub
End Class
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|