|
-
Apr 16th, 2000, 08:58 AM
#1
I am trying to make a program that will do math in the Hexadecimal system but I have no idea how to set it up to do the math in Hex.
Here's a more detailed explination of what I want to do:
The user inputs an 8-digit hexadecimal into a text field, then there are 6 buttons. By clicking 1 of the buttons, it subtracts a hexadecimal value specified by the button (ex. 4C0) from the inputed value and displays it in another text field.
Could somebody assist me in making this over AOL or something? Or be a really nice person and make the program for me? I could do some graphics for you if you wanted in exchange... anything in web design I can do...
AOL Name: Kukyfrope2
IM me if you can or want to try and help me!
Thanks!
Kuky
-
Apr 16th, 2000, 12:01 PM
#2
Fanatic Member
You'll need to catch non-hex test before you call this otherwise you'll get type mismatches
Code:
Private Sub Command1_Click()
Dim x As Long
Dim y As Long
Dim Ans As Long
x = CLng("&H" & Text1.Text)
y = CLng("&H" & Text2.Text)
Ans = x - y
Label1.Caption = Hex(Ans)
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|