Thread: Calculator in VB6

Results 1 to 9 of 9
  1. #1 Calculator in VB6 
    Senior Member PSP Elite Hacker Hercules's Avatar
    Join Date
    Jan 2008
    Posts
    1,194
    anyone knows how to make a caluculator in VB 6? i tried different methods of it, its almost like it is impossible...because you cant do it like mIRC where you can just use the $calc identifier...im so lost...thanks in advance

    EDIT: CAN A MOD MOVE THIS TO THE TECH THREAD? THANKS!
    Attached Files
    Reply With Quote  
     

  2. #2  
    Senior Member I Modded My PSP K-Wurx's Avatar
    Join Date
    Dec 2007
    Posts
    124
    I remember doing this in school and you have to load the math library to get it to work...

    That #lib shit that turns green at the top...

    Give me the code you are using asnd I'll see what I can do...it has been awhile mind you so no promises.
    Game Systems: PS1, PS2 x 2, X-Box with media center, Nintendo Wii w/WiiKey modchip.

    Multimedia Systems: PSP Slim W/ CFW 3.71 M33-3, 30GB IPod Video w/ Custom Theme+Rockbox+Podzilla, 4 GB IPod Nano (Newest generation), 30GB Zune.
    Reply With Quote  
     

  3. #3  
    Senior Member PSP Elite Hacker Hercules's Avatar
    Join Date
    Jan 2008
    Posts
    1,194
    Quote Originally Posted by K-Wurx View Post
    Give me the code you are using asnd I'll see what I can do...it has been awhile mind you so no promises.
    didnt you see the zip file i attached?
    Reply With Quote  
     

  4. #4  
    Senior Member I Modded My PSP K-Wurx's Avatar
    Join Date
    Dec 2007
    Posts
    124
    Yes, however...I don't have VB 6 installed on my computer and therefore cannot open your forms to see the code...So unfortunately, if you want help your going to need to post the code you have as in the:

    If x = 2 then...
    Some shit happens
    Else if...
    Some other shit happens
    End if
    Game Systems: PS1, PS2 x 2, X-Box with media center, Nintendo Wii w/WiiKey modchip.

    Multimedia Systems: PSP Slim W/ CFW 3.71 M33-3, 30GB IPod Video w/ Custom Theme+Rockbox+Podzilla, 4 GB IPod Nano (Newest generation), 30GB Zune.
    Reply With Quote  
     

  5. #5  
    Senior Member PSP Elite Hacker Hercules's Avatar
    Join Date
    Jan 2008
    Posts
    1,194
    Quote Originally Posted by K-Wurx View Post
    Yes, however...I don't have VB 6 installed on my computer and therefore cannot open your forms to see the code...So unfortunately, if you want help your going to need to post the code you have as in the:

    If x = 2 then...
    Some shit happens
    Else if...
    Some other shit happens
    End if
    dont know if it will work or fit but ok here it is, it is kinda messed up
    Code:
    Public Class Form1
        Dim storeValue
        Dim opp
        Private Sub btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn1.Click
            txtCalc.Text = txtCalc.Text & "1"
            storeValue = storeValue (opp) 1
        End Sub
    
        Private Sub btn2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn2.Click
            txtCalc.Text = txtCalc.Text & "2"
            storeValue = storeValue (opp) 2
        End Sub
    
        Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
            txtCalc.Text = txtCalc.Text & "3"
            storeValue = storeValue & 3
        End Sub
    
        Private Sub btn4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn4.Click
            txtCalc.Text = txtCalc.Text & "4"
            storeValue = storeValue & 4
        End Sub
    
        Private Sub btn5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn5.Click
            txtCalc.Text = txtCalc.Text & "5"
            storeValue = storeValue & 5
        End Sub
    
        Private Sub btn6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn6.Click
            txtCalc.Text = txtCalc.Text & "6"
            storeValue = storeValue & 6
        End Sub
    
        Private Sub btn7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn7.Click
            txtCalc.Text = txtCalc.Text & "7"
            storeValue = storeValue & 7
        End Sub
    
        Private Sub btn8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn8.Click
            txtCalc.Text = txtCalc.Text & "8"
            storeValue = storeValue & 8
        End Sub
    
        Private Sub btn9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn9.Click
            txtCalc.Text = txtCalc.Text & "9"
            storeValue = storeValue & 9
        End Sub
    
        Private Sub btn0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn0.Click
            txtCalc.Text = txtCalc.Text & "0"
            storeValue = storeValue & 0
        End Sub
    
        Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
            txtCalc.Text = txtCalc.Text & " + "
            opp = +
        End Sub
    
        Private Sub btnSub_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSub.Click
            txtCalc.Text = txtCalc.Text & " - "
            opp = -
        End Sub
    
        Private Sub btnMul_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMul.Click
            txtCalc.Text = txtCalc.Text & " * "
            opp = *
        End Sub
    
        Private Sub btnDiv_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDiv.Click
            txtCalc.Text = txtCalc.Text & " / "
            opp = /
        End Sub
    
        Private Sub btnClr_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClr.Click
            txtCalc.Clear()
            lblAns.Text = String.Empty
            storeValue = 0
        End Sub
    
        Private Sub btnEq_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEq.Click
            lblAns.Text = storeValue
        End Sub
    End Class
    Reply With Quote  
     

  6. #6  
    Senior Member PSP Elite Hacker mime's Avatar
    Join Date
    Jan 2007
    Posts
    1,949
    I took a year of VIsual Basic and honestly I hated it.. I did ok.. But I just dont like that bs..

    Also a calculator is by far the easiest of tasks. The coding does NOT have to be complex looking and non user-friendly like the one posted above. Theres easier coding to make calculators on VB6.

    I had the student edition installed but that was long ago. I cant open visual b asic files, if you want go google, and you'll find many calculator codes.


    Good luck!
    Reply With Quote  
     

  7. #7  
    Senior Member PSP Elite Hacker Hercules's Avatar
    Join Date
    Jan 2008
    Posts
    1,194
    oh blah...i hate VB, i will stick to mIRC's $calc function, but thanks tho
    Reply With Quote  
     

  8. #8  
    Senior Member PSP Elite Hacker dukepoth's Avatar
    Join Date
    Jan 2007
    Posts
    1,442
    I took a little VB for a semester but didnt learn crap but I always looked here for help and source code though visual basic, vb, active server pages (ASP),java, javscript,c, c++, c__ , vbscript,active server pages, ASP, vbscript,SQL, database, informix, oracle, SQL Server,Perl, CGI,Delphi, PHP,Free source code for the taking. Over five million lines of progra

    Pretty sure there's hundreds of calculator source code for vb 6 to look at on there.
    If you search you'll never have to ask questions again! GOOGLE

    ..*SHouldve picked up the Phone..Couldve been sony :S*.
    Reply With Quote  
     

  9. #9  
    Member PSP User
    Join Date
    Jan 2007
    Posts
    34
    here are the vb files for a simple calc they're from an assignment i had to do for college one of the first ones so it aint great but yea......

    o yea also has indentation for the assignment but i couldnt be bothered to take it out soz.

    RapidShare: 1-Click Webhosting
    Reply With Quote  
     

Similar Threads

  1. graphing calculator?
    By misternguyen in forum PSP Homebrew
    Replies: 9
    Last Post: 09-29-2010, 01:39 PM
  2. calculator
    By firestarterdr42 in forum PSP Homebrew
    Replies: 0
    Last Post: 07-21-2009, 11:15 PM
  3. Tetris, tic tac toe and calculator
    By Spazz in forum PSP Homebrew
    Replies: 6
    Last Post: 10-09-2006, 09:59 PM
  4. TI 83 Plus Calculator
    By Coleman4747 in forum Marketplace
    Replies: 11
    Last Post: 06-28-2006, 12:20 AM
  5. is there a good psp calculator?
    By psp in forum PSP Homebrew
    Replies: 9
    Last Post: 03-12-2006, 10:05 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •