Visual Basic 2008 HELPFUL snippets for nubs/non-nubs

Discussion in 'Programming & Scripting' started by rebelxpower, Dec 8, 2008 with 1 replies and 250 views.

  1. rebelxpower

    rebelxpower Enthusiast

    Messages:
    69
    Ratings:
    7
    Hello this is going to be a tutorial on visual basic 2008. By: JDpwns

    We will be learning How To:

    Setup a Timer
    And many helpful codes that will make your programs look Awesome!



    1) The Timer

    EXAMPLE: what the Timer does is you set the timer properties too. for example say 500 Miliseconds, this will execute the code you have coded in it (The Timer) every 500 miliseconds!

    Double click the timer,
    Code:
    Code:
    messagebox.show("SPAM", "Spammer")
    Now make a button on your form, Double click the button code:
    Code:
    Timer1.start()
    Start your program and test it! It should have Spammed a BUNCH of msgboxes!


    2) Ok now for some snippets:


    Msg box
    Code:
       msgbox.show("message here")     
    Message box
    Code:
       messagebox.show("Body", "Head")  
    Shows Form 2
    Code:
       form2.show()  
    1.0 is 100%
    Code:
       Me.opacity = 0.5  
    Closes Current form open.
    Code:
       Me.close()  
    hides program, keeps it running
    Code:
       Me.hide() 
    false or true or any object doesn't have to be just a button...
    Code:
       button1.visible = false 
     
  2. Ibdc

    Ibdc Retired Retired

    Messages:
    5,100
    Ratings:
    2,072
    Very basic, but yeah it's bound to help someone out there.