#1
  1. An Ominous Coward
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2002
    Posts
    4,425
    Rep Power
    0

    Cool My First Case of VB


    Frankly, I think that trying to get information about VB6 is like trying to pull teeth from a Polar Bear...

    At any rate, I sat down for the first time ever with VB6 today and decided to do an actual project to learn the stupid thing. The result? A clunky little calculator that's mouse-only, doesn't do decimals, and has a few bugs in its implementation. Oh well. It was a learning experience, and if I'm going to spend 3 hours making a stupid calculator, somebody better look at it dammit!

    LOL

    (attachment is a 7K zip)

    [edit]
    New calculator - ooooo... now it supports decimals and exponents, plus I fixed a runtime error with the C function. Marvel at the technical advances I bring mankind....
    [/edit]
    Attached Files
    Last edited by Ctb; May 21st, 2003 at 09:19 PM.
  2. #2
  3. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    793
    Not too bad
    It does as expected. I wouldn't get too involved in VB if I could help it. I kind of makes me pull my hair out at times.
  4. #3
  5. An Ominous Coward
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2002
    Posts
    4,425
    Rep Power
    0
    LOL - that's not what you want to hear from the forum mod - "Stay away".

    Ugh, I don't blame you. I did all that crap just typing stuff up as it came to me and using the Object Browser. The documentation didn't install properly, and MSDN is nearly worthless (though I did find the C*() casting functions on MSDN which helped a great deal). 90% of the bloody thing was done through guesswork based on the tiny bit of QBASIC I can remember and the few things I knew from Perl that were evolved from the old BASIC syntax. I spent almost 2 hours fighting with try .. catch .. thow only to find out that that isn't in VB6 - it's in .NET. Then I had to fight with the stupid on error goto crap until I figured out how to use it. Hell, it took me 20 minutes just to find out how you add a menubar to a form (hah hah - funny me to think that the menubar is a regular object like a toolbar or statusbar...)

    Oh well, the current version has some updates (including special error handling for overflow conditions and generic handling for most other erros), but the decimal place behavior is still a little funny sometimes (fortunately, you can no longer add more than one decimal place to a number).

    The most annoying thing by far, however, is the fact that Visual Studio NEVER closes - it crashes... every time I try to close it
    Attached Files
  6. #4
  7. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    793
    I don't want to discourage anyone from using vb, it does have its uses. Just in my experience, those who know other languages well (Perl, C, etc) will end up getting pissed at the language for wanting to do something in it that could easily be done in another language by just a few lines but is not the case with vb.

    I have to use it on a regular basis and it performs well as long as you use it to it's limitations. I don't know why your version will not shut down correctly, what service pack are you running?
    I also know what you mean about the msdn library. On one machine it installed properly, but on the current one I'm using, it installed everything except the vb info correctly. No commands show up in the index search, I just have to know the command and use F1 to get to it.

    If you run into any problems and need some help, don't hesitate to ask.

    [edit]Just took a look at your updated app. I get an Error: 20 for a minus, plus and exponent raise calls.[/edit]
    Last edited by Onslaught; May 27th, 2003 at 08:58 AM.

IMN logo majestic logo threadwatch logo seochat tools logo