Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 20th, 2005, 6:38 PM   #1
MuSiG
Newbie
 
Join Date: Apr 2005
Location: Nova-Scotia, Canada
Posts: 6
Rep Power: 0 MuSiG is on a distinguished road
Send a message via MSN to MuSiG
Newbie here...

Ok, so I made my first little program to take a radius value inputted by the user and use it in function with a height value to make a volume formula. Having said this I have very very basic knowledge in VB, I would like to know if anyone could start me off with a code to make a Calculator using only the 0-9 buttons and the "+" "-" "*" and "/". I know how to make a button and set it so when the user pushes this button via the mouse(e.g.1), the user inputs the value of the button into the program and it outputs that value onto the Answerbox. How can I make it so that when the user presses another button (e.g.2) it appears beside the 1 to make "12". I'm thinking that if the value "1" is inserted into the Answerbox and then "2" after that, the Answerbox will show "2" instead of "12" because it's telling the program to set the Answerbox.Text 1 then setting it to 2, erasing the previous digit. How could I make it so that the "1" stays there, allowing additional digits in the same textbox at once?

If you guys have trouble reading this message, just tell me and ill try to retype it in an easier way to read, or clarify things, I'm only 15 and i just took interest in the arts of Programming, Thanks for your time :p
MuSiG is offline   Reply With Quote
Old Apr 21st, 2005, 12:25 AM   #2
Bharathi
Programmer
 
Join Date: Apr 2005
Posts: 32
Rep Power: 0 Bharathi is on a distinguished road
Smile New to VB programming

Hi,

Log on to :http://www.vkinfotek.com and see whether those are helpful for you.

Regards
Bharathi
Bharathi is offline   Reply With Quote
Old Apr 21st, 2005, 12:33 AM   #3
uman
Expert Programmer
 
Join Date: Dec 2004
Posts: 794
Rep Power: 4 uman is on a distinguished road
If you're just starting off in programming, why not learn a more useful language like VB.net 2003, C# (a lot less typing!) or C++? Pre-.net VB is a bit useless for anything non-trivial, I'm sorry to say.

Anyway, glad to see a someone become interested in programming!
uman is offline   Reply With Quote
Old Apr 21st, 2005, 6:00 AM   #4
MuSiG
Newbie
 
Join Date: Apr 2005
Location: Nova-Scotia, Canada
Posts: 6
Rep Power: 0 MuSiG is on a distinguished road
Send a message via MSN to MuSiG
Hmm the reason why I'm starting VB is because I actually did try C++ and it woudln't cooperate AT ALL. I downloaded Dev-Cpp and EVERY code i copied from the internet, (even short 5 line ones) and pasted in my compiler, it would never compile...always had an error of some sort (It was always on the line where you put a { to begin adding what's inside the program. It pissed me off because I never found a solution, so then i read about VB being easier, but now I see that...well...there's much better stuff out there lol So if someone knows a good c++ compiler other then the cursed Dev's which keeps busting on me...let me know lol.
MuSiG is offline   Reply With Quote
Old Apr 21st, 2005, 11:53 AM   #5
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
What he's trying to say is, use Visual Basic .NET instead of VB. It's faster, better and more complete.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Apr 21st, 2005, 12:05 PM   #6
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
I'd say VB6 is a softer learning curve myself, and it's still the most widely used. It's perfectly possible to do this: in fact it's the classic "second program" (after hello world).

If you can't understand or find source code on psc (planetsourcecode.com) or google, we can talk you through it if you want.
Rory is offline   Reply With Quote
Old Apr 21st, 2005, 12:32 PM   #7
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
That's true, but come 2008, say, everyone will be using VB .NET. Anyway, what you want is:
Text1.Text = Text1.Text & Value
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Apr 21st, 2005, 6:40 PM   #8
uman
Expert Programmer
 
Join Date: Dec 2004
Posts: 794
Rep Power: 4 uman is on a distinguished road
That's odd, Dev-CPP works for me (although I use Visual Studio 2003)

If you don't have access to VS 2003 (which is better than 2005) you can download the "starter" version of 2005 for free on Microsoft's web site. It has way less features than the full version of Visual Studio, but it's still light years ahead of dev-cpp.

And if you must use an "easy" language, use C#. It's just as easy as Visual Basic but it has C-style syntax. It's also actually in high demand in the real world.
uman is offline   Reply With Quote
Old Apr 21st, 2005, 7:36 PM   #9
MuSiG
Newbie
 
Join Date: Apr 2005
Location: Nova-Scotia, Canada
Posts: 6
Rep Power: 0 MuSiG is on a distinguished road
Send a message via MSN to MuSiG
Thanks

Thanks uman, I really needed an easy language to start off in, I think I'll head out to the library tommorow and pick me up a C# book to start training :p

-MuSiG
MuSiG is offline   Reply With Quote
Old Apr 21st, 2005, 7:50 PM   #10
uman
Expert Programmer
 
Join Date: Dec 2004
Posts: 794
Rep Power: 4 uman is on a distinguished road
no problem
uman is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:45 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC