Results 1 to 13 of 13

Thread: Visual Basic Help

  1. #1
    Haydz's Avatar
    Haydz is offline 346 cu/in
    Ride
    VS UTE LS1 T56

    Join Date
    Nov 2007
    Location
    Liverpool.Sydney,NSW
    Posts
    1,435

    Default Visual Basic Help

    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

  2. #2
    Ride
    VT SII 5.7 LS1

    Join Date
    Jan 2008
    Location
    Albany, WA
    Posts
    204

  3. #3
    Haydz's Avatar
    Haydz is offline 346 cu/in
    Ride
    VS UTE LS1 T56

    Join Date
    Nov 2007
    Location
    Liverpool.Sydney,NSW
    Posts
    1,435

  4. #4
    Ride
    1995 HSV Clubsport T5, 1991 VN Berlina

    Join Date
    Jun 2005
    Location
    Melbourne
    Posts
    5,037

    Default

    Quote Originally Posted by ToMmO9 View Post
    They do VBS in school now?
    not vbs. just vb i think he means. what do you need help with. vb is pretty easy

    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




  5. #5
    Ride
    A Pushie

    Join Date
    Mar 2006
    Location
    Cronulla, NSW
    Posts
    228

    Default

    Quote Originally Posted by ToMmO9 View Post
    They do VBS in school now?
    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.

  6. #6
    Ride
    VT SII 5.7 LS1

    Join Date
    Jan 2008
    Location
    Albany, WA
    Posts
    204

  7. #7
    AirStrike's Avatar
    AirStrike is offline Site Administrator
    Ride
    2009 G6ET

    Join Date
    Jun 2003
    Location
    Melbourne
    Posts
    6,628

    Default

    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

  8. #8
    Haydz's Avatar
    Haydz is offline 346 cu/in
    Ride
    VS UTE LS1 T56

    Join Date
    Nov 2007
    Location
    Liverpool.Sydney,NSW
    Posts
    1,435

    Default

    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.

  9. #9
    Ride
    1995 HSV Clubsport T5, 1991 VN Berlina

    Join Date
    Jun 2005
    Location
    Melbourne
    Posts
    5,037

    Default

    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




  10. #10
    Ride
    A Pushie

    Join Date
    Mar 2006
    Location
    Cronulla, NSW
    Posts
    228

    Default

    Quote Originally Posted by Haydz View Post
    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.
    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.

  11. #11
    DannyboyDS is offline Just hand me the pliers.
    Ride
    VS Berlina

    Join Date
    Feb 2007
    Location
    Melbourne
    Posts
    2,257

    Default

    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.

  12. #12
    Haydz's Avatar
    Haydz is offline 346 cu/in
    Ride
    VS UTE LS1 T56

    Join Date
    Nov 2007
    Location
    Liverpool.Sydney,NSW
    Posts
    1,435

    Default

    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.
    Attached Files Attached Files

  13. #13
    Haydz's Avatar
    Haydz is offline 346 cu/in
    Ride
    VS UTE LS1 T56

    Join Date
    Nov 2007
    Location
    Liverpool.Sydney,NSW
    Posts
    1,435

    Default

    Anyone??......

Similar Threads

  1. VR Basic Upgrades
    By dufus in forum VR - VS Holden Commodore (1993 - 1997)
    Replies: 4
    Last Post: 26-07-2006, 07:33 PM
  2. Some random questions... (re: audio visual)
    By Morgasshk in forum Car Audio
    Replies: 8
    Last Post: 03-05-2006, 02:30 PM
  3. Some Basic Questions.
    By Gamble in forum Car Audio
    Replies: 3
    Last Post: 11-07-2005, 01:21 AM
  4. Basic 202 Mods
    By mza in forum VB - VK Holden Commodore (1978 - 1985)
    Replies: 11
    Last Post: 29-06-2005, 08:42 PM
  5. Basic Pod whoa's
    By VShiZ in forum VR - VS Holden Commodore (1993 - 1997)
    Replies: 1
    Last Post: 02-06-2004, 11:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71