Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming

Reply
 
LinkBack Thread Tools
Old 09-29-09   #1 (permalink)
Overclocker in Training
 
ZTR1760's Avatar
 
intel ati

Join Date: Jan 2006
Posts: 2,063

Rep: 58 ZTR1760 is acknowledged by some
Unique Rep: 51
FAQs Submitted: 1
Folding Team Rank: 235
Trader Rating: 8
Default Help with simple Visual Basic Coding

So Im not much of a coder, and I just started a Visual basic class and the teacher gave us this problem to code a basic cost calculator, simple enough, cept for one problem

Instead of just having two or more text boxes and taking those inputs and calculating them we have to have one text box, and have the user continuously input a value then click subtotal, then put in another value then hit subtotal and so on, until they have entered all the values then they hit grand total and get a final price with shipping and tax, this I have no clue how to do.....

So what would the code be to keep taking the value being inputted in one text box and keeping a running total?

Thanks for any help
__________________

Quote:
Originally Posted by Penicilyn View Post
ZOMG he's got nAMDias! in that beast!

System: OC Beast
CPU
E8500 @4GHZ
Motherboard
Gigabyte P45
Memory
4GB
Graphics Card
4850x2 2GB @ 690/1188
Hard Drive
500AAKS+250external
Sound Card
on board
Power Supply
650w corsair
Case
antec 900
CPU cooling
Vendetta 2
GPU cooling
stock
OS
vista ultimate 64bit/ windows 7
Monitor
20inch optiquest
1 Million+ Folding at Home points
ZTR1760 is offline I fold for Overclock.net   Reply With Quote
Old 09-29-09   #2 (permalink)
PC Gamer
 
Nhb93's Avatar
 
amd nvidia

Join Date: Aug 2009
Posts: 314

Rep: 18 Nhb93 Unknown
Unique Rep: 17
Trader Rating: 0
Default

Having taken and done well in a Visual Basic class, based off of the description of the project, I would say that you need a "total" variable, which I'm sure you knew. Each time you press the Subtotal button, you want to add the value in the text box to the total. When you hit grand total, you will want to return the subtotal times 1.00xxx (the x's here being the tax as a percent), and then add the shipping. Print that to a label. There you go.

System: HAFaestus (Alienware ported into HAF 932)
CPU
AMD Athlon 64 X2 6000+
Motherboard
Foxconn nForce 590 SLI
Memory
4GB
Graphics Card
GeForce 8800 GTX
Hard Drive
250GB Seagate + 750GB WD
Sound Card
Onboard
Power Supply
HIPRO HP-W700WC3 LF 700W
Case
Cooler Master HAF 932
CPU cooling
TRUE + Ceramique + San Ace 120
GPU cooling
Stock
OS
Windows 7 Professional 64-bit/Windows XP 32-bit
Monitor
Samsung SyncMaster 930B
Nhb93 is offline   Reply With Quote
Old 09-29-09   #3 (permalink)
Overclocker in Training
 
ZTR1760's Avatar
 
intel ati

Join Date: Jan 2006
Posts: 2,063

Rep: 58 ZTR1760 is acknowledged by some
Unique Rep: 51
FAQs Submitted: 1
Folding Team Rank: 235
Trader Rating: 8
Default

thanks!
__________________

Quote:
Originally Posted by Penicilyn View Post
ZOMG he's got nAMDias! in that beast!

System: OC Beast
CPU
E8500 @4GHZ
Motherboard
Gigabyte P45
Memory
4GB
Graphics Card
4850x2 2GB @ 690/1188
Hard Drive
500AAKS+250external
Sound Card
on board
Power Supply
650w corsair
Case
antec 900
CPU cooling
Vendetta 2
GPU cooling
stock
OS
vista ultimate 64bit/ windows 7
Monitor
20inch optiquest
1 Million+ Folding at Home points
ZTR1760 is offline I fold for Overclock.net   Reply With Quote
Old 09-29-09   #4 (permalink)
PC Gamer
 
Nhb93's Avatar
 
amd nvidia

Join Date: Aug 2009
Posts: 314

Rep: 18 Nhb93 Unknown
Unique Rep: 17
Trader Rating: 0
Default

Come back if you need any more help.

System: HAFaestus (Alienware ported into HAF 932)
CPU
AMD Athlon 64 X2 6000+
Motherboard
Foxconn nForce 590 SLI
Memory
4GB
Graphics Card
GeForce 8800 GTX
Hard Drive
250GB Seagate + 750GB WD
Sound Card
Onboard
Power Supply
HIPRO HP-W700WC3 LF 700W
Case
Cooler Master HAF 932
CPU cooling
TRUE + Ceramique + San Ace 120
GPU cooling
Stock
OS
Windows 7 Professional 64-bit/Windows XP 32-bit
Monitor
Samsung SyncMaster 930B
Nhb93 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -5. The time now is 02:24 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License

Terms of Service / Forum Rules | Privacy Policy | DMCA Info | Advertising | Become an Official Vendor
Copyright © 2009 Shogun Interactive Development. Most rights reserved.
Page generated in 0.11410 seconds with 8 queries