Kornowski's Software

Kornowski

VIP Member
Hey Guys,

I've done a bit of programming in College... I've done some very simple things, but I'd like to get your opinions on them :)

Here are the links to them, They are .exe files but there aren't any viruses :)

Kornowski's Calculator:

http://www.4shared.com/file/13081908/257e076f/Kornowskis_Calculator.html

Kornowski's Clock:

http://www.4shared.com/file/13081910/32bebe1c/Kornowskis_Calander_and_Clock.html


I've also made a currency convertor in MS Excel, but it's a .xml file and I don't know how to run it with-out having Excel open?

Anyway, What do you think? :D
 
aaah very good, made in VB i see? they are simple yes, but also well rounded, finished nicely and i have yet to find a bug in them, so yeh, they are excellent, you should definitely spend more time and create more applications

dragon
 
Yeah, VB :D

Thanks :)
I know of one bug I haven't learnt how to fix yet, it's in the Calculator, but I'll let you try and find it :P

I will, I've made a currency convertor, but I don't know what to do with it, it was made in Excel and it's a .xml file...
 
I like it ;)

I know nothing about VB but the bug you are talking about must be the "Overflow" when entering large figures.

You can see that I seriously tested it :P
 
Yeah, VB :D

Thanks :)
I know of one bug I haven't learnt how to fix yet, it's in the Calculator, but I'll let you try and find it :P

I will, I've made a currency convertor, but I don't know what to do with it, it was made in Excel and it's a .xml file...

If you enter text into the calculator, you get a runtime error. I believe VB has an easy option to limit to type of variable being entered in a text box.

And I made one like the calculator when I first started learning VB... you should make it so you can use the numpad like I did.
 
BUG FOUND: In the calculator, if you hit = (equals) without pressing any other buttons before hand, you get a runtime error aswell... ok so i take back what i said about it being bug free, but they are still very good

dragon

*EDIT* - infact, if you press ANY of the operator buttons withough entering a number it comes up with a runtime error....

*EDIT* - and also, you cant use the * button for multiply or the - button for subtract etc...

*EDIT* - why dont you post your code up and see if anyone here is an uber VB geek and could maybe help you out??
 
Last edited:
hehe they are quite good,I wouldnt have a clue how to make them :D

Thanks, I've only just started, it's great fun! You can use MS Excel if you want, Just open it and press Alt + F11

I like it ;)

I know nothing about VB but the bug you are talking about must be the "Overflow" when entering large figures.

You can see that I seriously tested it :P


Yeah, You found it, I still need a way to fix it :P

Thanks a lot for taking a look guys! :D

If you enter text into the calculator, you get a runtime error. I believe VB has an easy option to limit to type of variable being entered in a text box.

And I made one like the calculator when I first started learning VB... you should make it so you can use the numpad like I did.

I'll look into that, there's no good having an un-stable calculator :P
Yeah, That'd be cool.

BUG FOUND: In the calculator, if you hit = (equals) without pressing any other buttons before hand, you get a runtime error aswell... ok so i take back what i said about it being bug free, but they are still very good

dragon

*EDIT* - infact, if you press ANY of the operator buttons withough entering a number it comes up with a runtime error....

*EDIT* - and also, you cant use the * button for multiply or the - button for subtract etc...

*EDIT* - why dont you post your code up and see if anyone here is an uber VB geek and could maybe help you out??

I'll try and make it so that you can use the +, -, * and / keys, It'd be better.

Sure, I made it in college, I'll post the code in when I get to college.

I know rather a lot of VB, if you want I'd be happy to help fix your bugs. :)

Sure, If you want, I'll post the code up in a bit :)

Thanks a lot for taking a look guys! :D
 
It's really easy you know, I've only been doing it for about 2 weeks.

Do you have MS Excel? Open it and press Alt + F11, just have a mess around. :)
 
Here's the code for the Calculator:

Dim var_First_Number As Integer
Dim var_Second_Number As Integer
Dim var_Operator As String

Private Sub cmd_Clear_Click()
txt_Display = ""
End Sub

Private Sub cmd_Divide_Click()
var_First_Number = txt_Display
var_Operator = "Div"
txt_Display = ""
End Sub

Private Sub cmd_Eight_Click()
txt_Display = txt_Display & 8
End Sub

Private Sub cmd_Equals_Click()
var_Second_Number = txt_Display
If var_Operator = "Add" Then
txt_Display = var_First_Number + var_Second_Number
ElseIf var_Operator = "Min" Then
txt_Display = var_First_Number - var_Second_Number
ElseIf var_Operator = "Div" Then
txt_Display = var_First_Number / var_Second_Number
ElseIf var_Operator = "Mul" Then
txt_Display = var_First_Number * var_Second_Number
End If
End Sub

Private Sub cmd_Five_Click()
txt_Display = txt_Display & 5
End Sub

Private Sub cmd_Four_Click()
txt_Display = txt_Display & 4
End Sub

Private Sub cmd_Nine_Click()
txt_Display = txt_Display & 9
End Sub

Private Sub cmd_Plus_Click()
var_First_Number = txt_Display
var_Operator = "Add"
txt_Display = ""
End Sub

Private Sub cmd_Seven_Click()
txt_Display = txt_Display & 7
End Sub

Private Sub cmd_Six_Click()
txt_Display = txt_Display & 6
End Sub

Private Sub cmd_Subtract_Click()
var_First_Number = txt_Display
var_Operator = "Min"
txt_Display = ""
End Sub

Private Sub cmd_Three_Click()
txt_Display = txt_Display & 3
End Sub

Private Sub cmd_Times_Click()
var_First_Number = txt_Display
var_Operator = "Mul"
txt_Display = ""
End Sub

Private Sub cmd_Two_Click()
txt_Display = txt_Display & 2
End Sub

Private Sub cmd_Zero_Click()
txt_Display = txt_Display & 0
End Sub

Private Sub cmd_One_Click()
txt_Display = txt_Display & 1
End Sub
 
Right off, an easy cheat to increase the number's size before overflow is to change the Integers to Longs, the other more complicated method is to use strings to virtually remove the limit.

Also, to prevent crashing when no number has been entered, default the text box to 0 and make clear set it to 0 as well.
 
Right, So just replace all of the Intergers with Longs?

Right, So you mean set it to defualt as 0, so there is always a 0 in the text bow when it's first opened?
Also, what code would I need to change the cmd_Clear button to make txt_Display change to 0?
Would it be:

Private Sub cmd_Clear_Click()
txt_Display = 0
End Sub


Thanks :)
 
Well, as it is now if you leave the txt_Display set to "" and press one of the operation buttons it should crash. To fix it, set the text property to 0 and do this:

Private Sub cmd_Clear_Click()
txt_Display = "0"
End Sub

edit: Yes just changing Integer to Long will increase the max number size from 32767 (signed 16bit) to a couple billion (signed 32bit).
 
Last edited:
I haven't tried it. But I did make my own calculator that used strings to store ridiculusly long numbers. Addition and subtraction were fairly easy to implement but multiplication and division were very hard.
 
Well, I just changed the code to:

Private Sub cmd_Clear_Click()
txt_Display = "0"
End Sub

and the txt_Display showed 0 when you click the cmd_Clear but when you press the +, -, / or * button it gets rid of the 0, when you push another one it crashes!

Ok, I'll change them to Long now.

EDIT: Just changed them to Long but I still get an over flow error...
 
Back
Top