hey guys im doing a school project and need some help with visual basic.
anyone any good at it and willing to give me a hand?
cheers
They do VBS in school now?
1995 Manual HSV Clubsport
Wade Cam :: 9.2:1 CR :: Pacemaker headers :: Twin 2.5" Exhaust :: VT Brakes
1991 Supercharged VN Berlina
9 PSI SC14 Intercooled :: Genie headers :: Twin cats :: HM Twin 2.25 exhaust :: 3.45:1 LSD
VBS is different to VB.
Post any problems you're having... It's been about 8 years since I've worked with VB, but I do alot of C# and J2EE development, so I may be able to help with things in terms of logic, syntax is another issue but pretty easy to solve via the compiler.
Ah kk my bad.
I thought they were the same.
As mentioned, what do you need help with? It's been a few years since I have really used it, but used to be a gun![]()
Selling FG G6E Turbo and buying a N/A Supra
well i have written a program that is a quiz.
but for some reason i cant get the score to add each time you get a correct answer.
i have it as
wrong answer =score +score
correct answer_ = score +score+1
then lblscore.caption=score
where should i be declaring it? in the click code?
and should it be a static or dim?
cheers guys.
if it makes it easier i can post it up. with visual basic portable.
probably easier to post up the actual code
1995 Manual HSV Clubsport
Wade Cam :: 9.2:1 CR :: Pacemaker headers :: Twin 2.5" Exhaust :: VT Brakes
1991 Supercharged VN Berlina
9 PSI SC14 Intercooled :: Genie headers :: Twin cats :: HM Twin 2.25 exhaust :: 3.45:1 LSD
Have you got the score defined within a global scope or local scope?
Static variables hold their value at local scope, even once the function has completed.
Public Sub test()
Static test
test = test + 1
End Sub
That would increment test every time the function is called, but that variable would not be accessible outside of the function. It's for internal use only. Dims or regular variables would result in the variable being reset to 0 before being incremented every time the function is called.
For any function to access the score, you either need to pass it into a function that will display the new score, or have it defined globally.
looks like your in good hands here, if you get stuck you can PM me directly, VB was my best subject when I did my diploma, I still have the big friggen books for it too, just in case.
also google VBCODE and that will give you a wealth of info, sometimes simply reading other people programs can give you a better understanding of how a good program should flow.
Hey guys i have found the problem.
it is that the correct answer is one behind the question.
i know its something simple i just cant seem to get it.
any help will be greatly appreciated.