Click here to Skip to main content
15,917,005 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: When do I use a 'New' keyword to instantiate classes? Pin
Slow Learner29-Mar-06 3:50
Slow Learner29-Mar-06 3:50 
GeneralRe: When do I use a 'New' keyword to instantiate classes? Pin
J4amieC29-Mar-06 3:56
J4amieC29-Mar-06 3:56 
GeneralRe: When do I use a 'New' keyword to instantiate classes? Pin
IBetNoBodyWillHaveThisNameOrAlias29-Mar-06 5:31
IBetNoBodyWillHaveThisNameOrAlias29-Mar-06 5:31 
GeneralRe: When do I use a 'New' keyword to instantiate classes? Pin
Slow Learner29-Mar-06 7:37
Slow Learner29-Mar-06 7:37 
QuestionDisplaying Ink Levels Pin
johnjsm29-Mar-06 1:41
johnjsm29-Mar-06 1:41 
QuestionCalculator code Pin
Muahmmad Muneeb Javed29-Mar-06 0:15
Muahmmad Muneeb Javed29-Mar-06 0:15 
AnswerRe: Calculator code Pin
albCode29-Mar-06 0:22
albCode29-Mar-06 0:22 
AnswerRe: Calculator code Pin
J4amieC29-Mar-06 1:16
J4amieC29-Mar-06 1:16 
Hi,

As already posted, there are thousands of tutorials and articles online about writing a calculator - many of these will be in VB, and a quick google search will find them. Knowing how to find things is a very important part of any job and you should learn this skill well.

Writing a calculator can be done very simply, ranging up to the very complex. It depends what you want to learn. As you are a beginner you should start by breaking the problem down into manageable steps.

A typical simple calulator goes like this

1) Obtain a number from the user (tot)
2) Obtain an operator (+,-,*,/) from the user (op)
3) Obtain a number from the user (input)
4) Execute operator on 2 numbers and store back in tot (tot = tot op input)
5) repeat 2) - 4) until op is '='
6) Output tot

I would suggest you try this in a console application before trying to build a GUI, also if you have studied OOP yet then try to incorporate this into it (think Calculator object, Operator object, Number object etc).

remember, this forum is for code-related queries, so when(if?) you encounter a problem coding this then do post the code, the problem you are having and any other relevant info and we shall try to help you out.


QuestionMedia Player Pin
MHASSANF28-Mar-06 23:46
MHASSANF28-Mar-06 23:46 
AnswerRe: Media Player Pin
albCode29-Mar-06 0:14
albCode29-Mar-06 0:14 
AnswerRe: Media Player Pin
MHASSANF29-Mar-06 4:24
MHASSANF29-Mar-06 4:24 
QuestionProblem with ApplicationDeployProcessor, Updater Application Block 2.0 Pin
dlarkin7728-Mar-06 23:37
dlarkin7728-Mar-06 23:37 
QuestionAbout retriving data from video files Pin
ramyasangeet28-Mar-06 23:13
ramyasangeet28-Mar-06 23:13 
QuestionOutlook dev and icon probs Pin
thewebgremlin28-Mar-06 23:12
thewebgremlin28-Mar-06 23:12 
QuestionI want to change color of TD using C# code in ASP.NET Pin
Khawar Abbas128-Mar-06 23:04
Khawar Abbas128-Mar-06 23:04 
AnswerRe: I want to change color of TD using C# code in ASP.NET Pin
Chatura Dilan29-Mar-06 1:07
Chatura Dilan29-Mar-06 1:07 
GeneralRe: OK I want to change color of TD in VB code in ASP.NET Pin
Khawar Abbas129-Mar-06 1:11
Khawar Abbas129-Mar-06 1:11 
GeneralRe: OK I want to change color of TD in VB code in ASP.NET Pin
Dave Kreskowiak29-Mar-06 1:26
mveDave Kreskowiak29-Mar-06 1:26 
AnswerRe: I want to change color of TD using C# code in ASP.NET Pin
bony_baba30-Mar-06 1:00
bony_baba30-Mar-06 1:00 
QuestionHow to avoid Recursive Event Triggering between Controls Pin
twohops28-Mar-06 22:03
twohops28-Mar-06 22:03 
QuestionQuestion In vb.net Pin
Arag0328-Mar-06 21:59
Arag0328-Mar-06 21:59 
AnswerRe: Question In vb.net Pin
albCode28-Mar-06 22:12
albCode28-Mar-06 22:12 
Questiondatareader problem Pin
thepityone28-Mar-06 20:45
thepityone28-Mar-06 20:45 
Questionsound recognition Pin
susee_132328-Mar-06 20:44
susee_132328-Mar-06 20:44 
QuestionScanner Activation Pin
Thoombath28-Mar-06 20:17
Thoombath28-Mar-06 20:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.