View Full Version : VB6 help needed!
JTD121
Sat, 04-03-2004, 09:38 AM
Well, I am making a big extension to an older change program of mine. I will now make a menu, with 50 selections, so you can pick which states' tax you want it to calculate!
Only problem, I dunno how to make tax recognize the menu items with their values.
I've uploaded (http://home.comcast.net/~jtd121/Change2.frm) it for you guys, if you want to take a look. It's in the 'txtPrice_KeyPress' area, you should see the comment there. Any help would be appreciated!
mainva | aptigo | JTD out
JTD121
Sun, 04-04-2004, 10:54 PM
No one knows any VB? Any help at all would be great! i/expressions/face-icon-small-smile.gif
mainva | aptigo | JTD out
Lego
Mon, 04-05-2004, 04:51 PM
Never learned visual basic while in school. Altough i hear its pretty easy.
JTD121
Mon, 04-05-2004, 05:42 PM
Originally posted by: Lego
Never learned visual basic while in school. Altough i hear its pretty easy.
.................................................. .................................................. .................................................. .............
mainva | aptigo | JTD out
Raven
Tue, 04-06-2004, 12:15 AM
You'll need to declare each tax value as a Global Constant Variable. If you're studying VB you should know what I'm talking about. If not, post here.
JTD121
Tue, 04-06-2004, 11:18 AM
I know what your talking about, but you mean that I have to declare 50 global constants? And you mean 'const=x' in the general declarations area?
mainva | aptigo | JTD out
Raven
Wed, 04-07-2004, 12:34 AM
Yeah, you will have to declare all the variables. Annoying, but it has to be done for the type of program you're talking about. And it would be:
Const curWhateverState As Currency = 0.23
or whatever the values are.
JTD121
Wed, 04-07-2004, 01:03 PM
Oh, well, I guess I have to. Now, about the menu, I have some modules that will allow me to do a Windows-like menu where, if there are too many items, it will shrink and have the arrows at the top and bottom, you know?
Well, I will try to do it with only like 4 or 5 states, to start. Then I will try that extended menu, or a pop-up menu, and then RAR the project and upload it for you if you want to look at it.
mainva | aptigo | JTD out
EDIT: Would I have to put anything new in the code for the calculations? I just tried declaring the four states as Const's, and then ran it, and the tax always comes out to $0.75, even if I use NH tax, which there is none....Hm....
EDIT 2: I just tried declaring tax = mnuTax, and now the tax comes up as the price in parentheses, such as ($14.98) and then says the amount owed is nothing....o_0
JTD121
Wed, 04-07-2004, 06:39 PM
Declaring them as global constants doesn't seem to work. However, I may not be declaring tax properly. I tried tax = val(mnutax) and the tax came up as nothing. I tried tax = mnutax and it was the same...I'm not sure what to declare tax as...*sh*rugs
mainva | aptigo | JTD out
Raven
Thu, 04-08-2004, 09:45 AM
Post a new updated link, and I'll have a look through the code, I should be able to help.
JTD121
Thu, 04-08-2004, 10:56 AM
Alright, here (https://http://home.comcast.net/~jtd121/Change_Program.zip) is an updated ZIP file. It contains the whole project, form files, etc. However, the pop-up menu isn't used at the moment, but I plan to use it. The commands for it at commented out, so use that as you will.
And thanks for your help! You are the only one that has had anything constructive to say (among the forums I post on).
mainva | aptigo | JTD out
Raven
Fri, 04-09-2004, 09:10 PM
No problem. i/expressions/face-icon-small-smile.gif
Ok, I have to go to work now, I'll have a look when I get back, I'll edit this post when I have something to say.
Sorry to keep ya waiting, I'll have a look at it now, brb.
Raven
Wed, 04-21-2004, 02:22 AM
Sorry it's taken me ages to reply, but the new zip file isn't working. Fix it up, and I'll take a look.
EDIT: Disregard, I found the error in the URL and fixed it. Looking now.
Question: Could you please include the whole project including any modules and the project file (.vbp) in the zip file? The forms by themselves are having trouble in run time without them.
JTD121
Thu, 04-29-2004, 07:04 AM
Uh, yeah, just change the '.zip' to '.rar' at the end of the URL above. I'm not sure why I uploaded both, but the RAR has the project file and everything.
mainva | aptigo | JTD out
JTD121
Mon, 05-03-2004, 08:48 PM
Nothing, CmDr_RavEn? I haven't been playing with any VB recently, but I will try adding a module or something tomorrow. It's gotta be some kind of trick I need to use to get it to work in any way, not just as a menu or a pop-up menu or a big extra form with 50 buttons....There's just gotta be a way to do what I want to do...Unless assembly or C/C++ is the only way to do it...But then, why bother even having VB if those two 'better' languages can do it?
mainva | aptigo | JTD out
Raven
Tue, 05-04-2004, 05:35 AM
Like I said before, can you please include the whole project including any modules and the project file (.vbp) in the zip file? The forms by themselves are having trouble in run time without them.
JTD121
Tue, 05-04-2004, 09:49 AM
Ah, I see. Well, you just need to change the URL from before to '.rar' instead of '.zip' But here (http://home.comcast.net/~jtd121/Change_Program.rar) is the updated link for you. There is only one project file, and then the three forms, one of which isn't being used at the moment, the pop-up menu.
mainva | aptigo | JTD out
JTD121
Fri, 05-28-2004, 11:26 AM
Anything yet? I've moved on for now, since I have a final to do, with three programs being CS2B level,and I'm only in CS1B...¬_¬
But I will be coming back to this later.
mainva | aptigo | JTD out
Raven
Sat, 05-29-2004, 11:18 PM
Haha really sorry man, it sorta slipped my mind, as I'm finishing my degree as we speak. BUT, my last exam will be in 2 weeks, and after that I'll take a proper look.
Washuu-chan
Sun, 05-30-2004, 09:36 AM
Well, I would help you, I still know VB pretty decently, and java too i/expressions/face-icon-small-happy.gif
- I have a good since of using variables in the correct way to calculate whatever you want, so post a free version of file again, the other ones were dead links
JTD121
Mon, 05-31-2004, 10:45 PM
Not to be an ass, but the link is up above at least three times. However, I would like some help on this, since this is a side-project to further my personal understanding of VB, not classwork.
Anyway, here is the link (http://home.comcast.net/~jtd121/Change_Program.rar) to the RAR file with the project, and three forms, of which only two are being used.
And CmDr_RavEn, that's quite alright, if you had told me earlier, I wouldn't have continued bugging you! i/expressions/face-icon-small-tongue.gif
mainva | aptigo | JTD out
Washuu-chan
Fri, 06-04-2004, 06:05 PM
^.^ those links didn't work.
:: i'd like to say, that pop-menu system is not that practical, and shouldnt you make the "main menu" on the top left... or else you cant control things :/
Barumonk
Mon, 06-14-2004, 11:30 PM
http://www10.brinkster.com/botdev/ChangeProject.rar
I just edited it on my own, and cleaned it up a bit. I'm not really sure why the other forms were needed (specifically the pop-up menu stuff), so I just took it out. Feel free to add it back if you wish.
Edit: err, I ended up using VB.NET naming conventions, but it should still be readable.
JTD121
Wed, 06-16-2004, 04:03 PM
Ah, I see. I am an novice/intemediate level programmer. And for some reason, my school only used VB6, so I am used to VB6 stuff.
However, do you have VB6? I can always upgrade to VB.net, but I won't be able to bring it in to CS2A/B next year and use all of it is all.
And thanks!
mainva | aptigo | JTD out
Barumonk
Wed, 06-16-2004, 05:44 PM
If your question is directed at me, then I do have VB6. The .NET IDE most likely won't know how to handle VB6 files. The rar file I posted earlier is all VB6, the naming conventions for variables and functions are VB.NET style is all. Instead of "frmMain", it would be "MainForm"; you can always just edit them back.
Also, if your thinking of upgrading to VB.NET I suggest you look into object oriented programming concepts. VB.NET is a OOP language, its not event driven like VB6.
JTD121
Sun, 06-20-2004, 09:22 PM
Alright, here (http://home.comcast.net/~jtd121/Change_Project.exe) is the final program for now. Hit the 'About' button for info and instructions before doing anything. Also, any bugs, please report them to me here.
And thanks to Barumonk, who is cited in the About as well! If you would like your real name to be cited, PM/IM me and let me know, and I will modifiy accordingly! Thanks again!
mainva | aptigo | JTD out
JTD121
Thu, 06-24-2004, 12:03 AM
No comments of any kind? No complaints, or additions I could make? Perfection? Baka-na! ('Impossible!') i/expressions/face-icon-small-smile.gif i/expressions/face-icon-small-wink.gif
mainva | aptigo | JTD out
Powered by vBulletin® Version 4.2.3 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.