Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VB6 Project 1 - Calculate this.
#1
I'm going to try to write small projects users can build to help learn VB6. This will also help others by providing different methods / ideas on how to solve a solution. If you have any ideas for a project please PM me. I will give you full credit if I use it.

Our first program will be a small calculator program. You must be able to input any 2 numbers and use all basic math operators (+,-,/,*). The user must be able to pick what mathematical operator to use.

Overview
  • Input 2 numbers.
  • Must have all basic math operators - (+,-,/,*)
  • User must be able to pick which mathematical operator to use.

Notes
  • Please provide the source when submitting a project.
  • Make sure to comment your code.
Reply
#2
Your address is wrong. Htpp. Lol.

But I tried it the right way, and it still doesn't work.
Reply
#3
You fixed it!
Reply
#4
I did a brief look through and it looks great so far!
Reply
#5
Download mine; http://www.megaupload.com/?d=O14UO35P
Textbox calculator. This was like, the second program I ever made. I've always liked it better than the command button calculator.
Updated it a little today, too.
(First being the Command1_Click()
MsgBox "Hello World!" Shit, lol)
Reply
#6
:'(

[spoiler][Image: 2cp895x.jpg][/spoiler]
Reply
#7
http://www.megaupload.com/?d=V4K3VJAK
Eh. changed it a little bit.
Fixed the Divide by zero error I'm pretty sure.
I think Type mismatch is gone, too.
Reply
#8
KruSuPhy Wrote:http://www.megaupload.com/?d=V4K3VJAK
Eh. changed it a little bit.
Fixed the Divide by zero error I'm pretty sure.
I think Type mismatch is gone, too.

I still get the divide by zero error.
Code:
Case DIVISION
            If CDbl(Val(frmCalculator.txtDisplay.Text))  0 Then
                frmCalculator.txtDisplay.Text = TempValue / CDbl(Val(frmCalculator.txtDisplay.Text))
            Else
                'error trap method
            End If

it seems you could trap the error right in the case statement here. I looked at your code for a bit but did not see where you were trying to trap it before.
Reply
#9
I am not sure if my calc has any errors...but here it is.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)