|
|
#11 (permalink) |
|
VIP - Graphics Guru
![]() Join Date: Jul 2006
Location: Liverpool, UK
Age: 18
Posts: 12,052
|
Ok sure, Good Day, it's 8:12AM here
__________________
Intel Core 2 Duo E6300 @ 2.8GHz Gigabyte GA-965P-S3 - Rev 3.3 4GB Crucial Ballistix @ 800MHz PNY 8800GTS G92 @ 800/2000/1000 Corsair HX520W Windows Vista Home Premium Seagate Barracuda 500GB 7200.11 SATA II Tuniq Tower LED OCZ XTC RAM Cooler Antec 900 (Modded) 3DMark06: 11,500
Winner of Photo Tournament: People, Jewelry & Dead Space Member of COD4 [CF] Clan: [CF] Kornowski |
|
|
|
|
|
#12 (permalink) |
|
Diamond Member
![]() Join Date: Jul 2006
Location: Soul Chamber
Posts: 5,464
|
super cool.look at the fonts on the clock. really wish i could learn to do programming
__________________
Laptop: Thinkpad X60: Core2Duo T7200 @ 2Ghz,1GB DDR2,110GB SATA -winXP ProSP2 Work Desktop: Core Duo E2180 @ 2Ghz,1.5GB DDR2,240GB HD - XP PRO SP2 Home: Core Duo E2180 2Ghz,1.5GB DDR2,Nvidia GForce 6200TB,320 GB (2x160GB) -Dual boot - XP / OSX 10.5.2 |
|
|
|
|
|
#13 (permalink) |
|
VIP - Graphics Guru
![]() Join Date: Jul 2006
Location: Liverpool, UK
Age: 18
Posts: 12,052
|
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.
__________________
Intel Core 2 Duo E6300 @ 2.8GHz Gigabyte GA-965P-S3 - Rev 3.3 4GB Crucial Ballistix @ 800MHz PNY 8800GTS G92 @ 800/2000/1000 Corsair HX520W Windows Vista Home Premium Seagate Barracuda 500GB 7200.11 SATA II Tuniq Tower LED OCZ XTC RAM Cooler Antec 900 (Modded) 3DMark06: 11,500
Winner of Photo Tournament: People, Jewelry & Dead Space Member of COD4 [CF] Clan: [CF] Kornowski |
|
|
|
|
|
#14 (permalink) |
|
VIP - Graphics Guru
![]() Join Date: Jul 2006
Location: Liverpool, UK
Age: 18
Posts: 12,052
|
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
__________________
Intel Core 2 Duo E6300 @ 2.8GHz Gigabyte GA-965P-S3 - Rev 3.3 4GB Crucial Ballistix @ 800MHz PNY 8800GTS G92 @ 800/2000/1000 Corsair HX520W Windows Vista Home Premium Seagate Barracuda 500GB 7200.11 SATA II Tuniq Tower LED OCZ XTC RAM Cooler Antec 900 (Modded) 3DMark06: 11,500
Winner of Photo Tournament: People, Jewelry & Dead Space Member of COD4 [CF] Clan: [CF] Kornowski |
|
|
|
|
|
#15 (permalink) |
|
Moderator
![]() Join Date: Dec 2004
Location: Canada
Age: 25
Posts: 10,112
|
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.
__________________
You know what the chain of command is? It's the chain I go get and beat you with 'til ya understand who's in ruttin' command here. I must plug a couple comics because they are good :D: www.ctrlaltdel-online.com www.userfriendly.org |
|
|
|
|
|
#16 (permalink) |
|
VIP - Graphics Guru
![]() Join Date: Jul 2006
Location: Liverpool, UK
Age: 18
Posts: 12,052
|
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
__________________
Intel Core 2 Duo E6300 @ 2.8GHz Gigabyte GA-965P-S3 - Rev 3.3 4GB Crucial Ballistix @ 800MHz PNY 8800GTS G92 @ 800/2000/1000 Corsair HX520W Windows Vista Home Premium Seagate Barracuda 500GB 7200.11 SATA II Tuniq Tower LED OCZ XTC RAM Cooler Antec 900 (Modded) 3DMark06: 11,500
Winner of Photo Tournament: People, Jewelry & Dead Space Member of COD4 [CF] Clan: [CF] Kornowski |
|
|
|
|
|
#17 (permalink) |
|
Moderator
![]() Join Date: Dec 2004
Location: Canada
Age: 25
Posts: 10,112
|
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).
__________________
You know what the chain of command is? It's the chain I go get and beat you with 'til ya understand who's in ruttin' command here. I must plug a couple comics because they are good :D: www.ctrlaltdel-online.com www.userfriendly.org Last edited by Cromewell; 03-29-2007 at 10:57 AM. |
|
|
|
|
|
#18 (permalink) |
|
VIP - Graphics Guru
![]() Join Date: Jul 2006
Location: Liverpool, UK
Age: 18
Posts: 12,052
|
Yeah, It does crash. Have you tried it?
Damn, I missed the quotation marks out
__________________
Intel Core 2 Duo E6300 @ 2.8GHz Gigabyte GA-965P-S3 - Rev 3.3 4GB Crucial Ballistix @ 800MHz PNY 8800GTS G92 @ 800/2000/1000 Corsair HX520W Windows Vista Home Premium Seagate Barracuda 500GB 7200.11 SATA II Tuniq Tower LED OCZ XTC RAM Cooler Antec 900 (Modded) 3DMark06: 11,500
Winner of Photo Tournament: People, Jewelry & Dead Space Member of COD4 [CF] Clan: [CF] Kornowski |
|
|
|
|
|
#19 (permalink) |
|
Moderator
![]() Join Date: Dec 2004
Location: Canada
Age: 25
Posts: 10,112
|
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.
__________________
You know what the chain of command is? It's the chain I go get and beat you with 'til ya understand who's in ruttin' command here. I must plug a couple comics because they are good :D: www.ctrlaltdel-online.com www.userfriendly.org |
|
|
|
|
|
#20 (permalink) |
|
VIP - Graphics Guru
![]() Join Date: Jul 2006
Location: Liverpool, UK
Age: 18
Posts: 12,052
|
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...
__________________
Intel Core 2 Duo E6300 @ 2.8GHz Gigabyte GA-965P-S3 - Rev 3.3 4GB Crucial Ballistix @ 800MHz PNY 8800GTS G92 @ 800/2000/1000 Corsair HX520W Windows Vista Home Premium Seagate Barracuda 500GB 7200.11 SATA II Tuniq Tower LED OCZ XTC RAM Cooler Antec 900 (Modded) 3DMark06: 11,500
Winner of Photo Tournament: People, Jewelry & Dead Space Member of COD4 [CF] Clan: [CF] Kornowski |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| homepage hijacked by nice.allxun | sid | Computer Security | 2 | 12-03-2006 05:35 AM |
| Free AOL AVS (Kaspersky) Update | edifier | Computer Security | 11 | 11-05-2006 04:09 AM |
| How to Use Free Software to Remove Spywares | YuHang | Computer Security | 2 | 09-14-2006 10:50 AM |