[TuT] For totally new Visual Basic users. menu

Shout-Out

User Tag List

Results 1 to 9 of 9
  1. #1
    Mitron's Avatar Contributor
    Reputation
    127
    Join Date
    Jun 2008
    Posts
    1,326
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [TuT] For totally new Visual Basic users.

    Visual Basic 2008 Personal Tips and Basic Codes

    Read in thread or download as doc file:
    MEGAUPLOAD - The leading online storage and file delivery service (its looking really good thanks of Praesto)

    Introducing

    Visual Basic 2008 is a programming language created by Microsoft and is the easiest coding language i know to make your own windows applications. There are many things you can do with it like chat programs, databases and much much more. I wont go into any advanced things here but the basics can be used to many things.

    Get Started
    First of all you need to think of an app you want to do, then create the layout, place buttons, labels, trackbars,textboxes, more windows and other things you want.
    It can be hard to know what everything is for but you will learn the more you work with it.

    " I always finish all layout things before i start with the codes because if i place one thing and write the code for it before i place everything else i feel it's getting messy, i do change and add layout things later on so it looks better or get better functions and i do rename every button after i coded them to remember wich code that belongs to wich button."

    Coding Basics
    Here is the coding part and i first tell you that it's not easy if you are a beginner. To write a code just double click the button, textbar, picture or whatever you want to code. It will open another window where the codes shows. Visual Basic already gives you some start codes for the part you want to edit so you only need to write the code for what thething should do.
    For example when you double click on an un-coded button it looks like

    Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
      
          End Sub
    End Sub should be in the end of every part you code, if not the code will try to work together with the next code that comes under it and that will cause problems when you try to build the app.
    Same with Private Sub, it should always be in top of every code part.
    In the beginning over all codes it should be Public Class Form1 and
    End Class should be in the end under the rest of the codes.


    If a code looks like

    Code:
    If TimeOfDay.Hour = (thehour) And TimeOfDay.Minute = (theminute) Then
                  Media.SystemSounds.Beep.Play()
              End If
    it must contains the End If at the end. I marked with blue the things you going to look at

    "When i have many buttons i start to code button1 and keeps go in the number order. It's always easiest for me but some people probably go for the ones thats most important first."

    Basic Codes and Explanation
    Here i will set up a little list with codes to use and i will add a little explanation what it does for you.

    Timer1.Start() starts Timer1. Timers can be used to create many different thing. I will take an example further down but no more.

    Timer1.Stop() stops Timer1

    Me.Close() Closes the form that the button is placed on.

    Form1.Show() Opens Form1

    Form1.Hide() Hides Form1

    This is Basic Basic and doesnt have any big functions (except of form browsing)

    Here comes some harder ones with more explanation
    ( I only use World of Warcraft as example )

    Create an timer, doeble click and use this:
    Code:
    appactivate("World of Warcraft")

    This one will activate the app so it "controls" you program a little bit (in this case World of Warcraft)


    To get the timer "click" a button so your character walk a little bit every 5th second just click the timer and change the Interval to 5000 ( 5000 milliseconds = 5 seconds) now double click your timer and write:
    Code:
    sendkeys.send("w")

    This code will make the timer to click W button for you ever 5th second so it walks forward.
    It's a little different with other buttons though.
    Like Enter button looks like sendkeys.send: ("{ENTER}")
    Tab : sendkeys.send("{TAB}")
    and Space Bar : sendkeys.send("{SPACE}")

    "I always think logical when i need a code. Look at the codes and you see that they are very logical. I always keep that in mind and it always helps me."

    Application Building
    Now when you think your done with you with you app you sure want it as a .exe file. But first you should test it and see if there is any errors, to do that press F5 Button and it will open a test of your app. Test it out and when you dont find any problems just close the app and go to the top and press Build then Build <YOUR APP NAME> and it normally appears in
    Documents and Settings\Administrator\My documents\Visual Studio 2008\Projects\projectname\projectname\bin




    Please dont flame because this is very basic.... i know its very very basic and its ment to be that. This is for users who want to start Visual Basic but dont know where to start. Sorry if i made some mistakes in grammar or spelling, english is my second language.
    Whole this little Tut is made by me, though some of the codes comes from other guides on MMOwned.
    Hope some of you like it though.
    Last edited by Mitron; 06-15-2009 at 07:16 AM.

    ----------------------------------------------------------------

    [TuT] For totally new Visual Basic users.
  2. #2
    Praesto's Avatar Contributor

    Reputation
    198
    Join Date
    Nov 2007
    Posts
    1,271
    Thanks G/R
    0/2
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put up the .doc as a downloadable attachment.

  3. #3
    Mitron's Avatar Contributor
    Reputation
    127
    Join Date
    Jun 2008
    Posts
    1,326
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i uploaded the doc now

    ----------------------------------------------------------------

  4. #4
    Ravenheart's Avatar Nevermore
    Reputation
    355
    Join Date
    Oct 2007
    Posts
    549
    Thanks G/R
    3/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't code in VB, but it actually looks pretty good +Rep
    Last edited by Ravenheart; 06-14-2009 at 04:56 AM. Reason: Typo :P

    Don't forget You're able to design your own universe.


  5. #5
    Mitron's Avatar Contributor
    Reputation
    127
    Join Date
    Jun 2008
    Posts
    1,326
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks alot its nice to hear that the guide looks good ^^

    ----------------------------------------------------------------

  6. #6
    miLl3niUm's Avatar Member
    Reputation
    16
    Join Date
    Jun 2009
    Posts
    312
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know all this but +Rep for taking the time and effort you put to write this

  7. #7
    Mitron's Avatar Contributor
    Reputation
    127
    Join Date
    Jun 2008
    Posts
    1,326
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    From beginning it wasnt ment to be here on mmowned but later i posted it anyways ^^ thanks guys..

    ----------------------------------------------------------------

  8. #8
    Weekday's Avatar Contributor

    Reputation
    144
    Join Date
    Sep 2007
    Posts
    350
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Mitron View Post
    ( 500 milliseconds = 5 seconds)
    No, 5 seconds is 5000 milliseconds.

  9. #9
    Mitron's Avatar Contributor
    Reputation
    127
    Join Date
    Jun 2008
    Posts
    1,326
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh mistype... sorry ^^ ill fix it thanks for telling me that :P

    ----------------------------------------------------------------

Similar Threads

  1. Looking for someone with good visual basic skills
    By InfamousRage in forum Programming
    Replies: 0
    Last Post: 01-24-2016, 07:29 AM
  2. Former Shadowbot user. Looking for a new bot. Suggestions?
    By JLawL in forum WoW Bots Questions & Requests
    Replies: 2
    Last Post: 12-03-2013, 07:28 PM
  3. [Buying] diablo 3 gold 200m total for my new wiz account
    By jamesmacasling in forum Diablo 3 Buy Sell Trade
    Replies: 2
    Last Post: 12-10-2012, 12:05 AM
  4. Looking for a new realm to join...
    By Ðeception in forum World of Warcraft General
    Replies: 0
    Last Post: 09-28-2006, 09:08 PM
All times are GMT -5. The time now is 02:10 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search