Skip to content

VB Tutorials Part 1 – Making My first Program

Viewing 15 posts - 1 through 15 (of 30 total)
  • Author
    Posts
  • #190496
    Admin
    Administrator

    Ok, lets get this started this is for absolute newbies 🙂 I going to show people how to lear visual basic the easy way. How i did it anyways 8)

    First if you going to be doing basic programming like me forget about books, they just a waste of time I read a book to try to learn VB and it confuse me more then anything 🙂 but if you think you want to do advance stuff I guess books is the way to go.

    Aigh here we go first get VB 6 search on yahoo or better yet buy it on limewire 😉

    So Now you have the program install and we ready to start, we going to make a real basic program I want to do this because i want you guys to get the feel of vb and to see how easy it can be,

    First we start VB and the first screen you will get is this

    Now here we going to select Standard EXE it should be already selected then you press Open

    Now you come open the next screen I can fit everything so I going to devide the pic into two on the left you will see this

    And on the right you will see this

    Okie so lets get started you see this is the form where we put all the command buttons, textboxes ect..

    Now this is going to be an easy program all its going to do is send a pop up messege saying my first program, its easy as hell 🙂 but I am tellign you it,s going to take you a long way on undertanding vb 🙂

    First it be best to make the form smaller, so put the mouse on the form blue borders and drag it to the desire size, it’s the same as making a windows windows smaller or bigger ):

    Ok now we must select a command button from the components box I am talking about this

    The components box has all the things you need to create the program such as text boxes, buttons ect.. 🙂

    Ok now er going to select a command button which is located on the area surrounded by the red circle in this pic

    Click on it then move the mouse on top of the form you will see something like a plus sign click on the form where you want to put the button

    now your form should look similar to this,

    You see the command button has some blue squares around them, well you drag those to resize the command button 🙂

    Ok now we ready to put some code on the command button

    Click on the command button and this screen should pop up

    now we going to enter this basic code between Private Sub Command1_Click() and End Sub
    enter this code

    MsgBox “My first program”

    it should look like this

    See how easy you just made a program 🙂 now lets test our program
    on top of vb you will see a play button i am talking about this

    Click on that and the program should pop up, now click on the button and the messege box saying my first program should pop up.

    there you go 🙂

    now lets compile the program you know to make it an exe so people can use it. fist stop the program, click on the stop button right next to the play button.

    then we click on File on the top right of vb this window should come up

    you see where it says Make Project1.exe click on that now a pop up with the Make project save box shoudl come up, there where it says File name enter the name you want for your program and ended with .exe for example you want to name your program first you will type first.exe on the box then press Ok, it should compile it, Ah make sure to remember which folder you compile it so you can run it and try it lol. aigh so go to the folder where you compile it and click on the first.exe and there you go your first program

    🙂

    Now before you close vb save the vb source code of your program, click on file again and then on save as, and save it that way 🙂 so incase you want to comeback and make changes to it. you just go where you save the vb source code and click on it and you ready to edit some more.

    as you can see vb is easy and I going to make more tutorials to help u understand even better so keep on checking the forums 🙂

    #190525
    AhFox
    Member

    My guessing is that you’re bored!

    #190524
    Admin
    Administrator

    lol yeps 🙂 and I want new peeps to start programming cause school started and my time is limited, so I hoping other peeps upgrade the programs 🙂

    #190523

    thanks loco that realy helped i didnt kno about that i kno how to design da program but not make it but yeh thanks man 😮

    #190522
    richous05
    Member

    wow gr8 tutorial i didnt think it was that easy thought it was like hours and hours of endless code to do 2 functions then you have to build a graphical interface but you dont 😀 im just borrowing vb 6 from rapidshare 🙂 im gonna try and if i do ill continue practising and hopfully be a sucessful vb programmer and it will be all thanks to you.

    #190521
    Admin
    Administrator

    Glad we could help and if u need more help just ask 🙂

    #190520
    MrAl3n
    Member

    pretty easy now

    hey loco why do i keep gettin run time error

     

    Private Sub Command1_Click()
    Dim window As Long
    
    On Error Resume Next
    window = FindWindow("my window class", vbNullString)
    PostMessage window, WM_COMMAND, 33027, 0
    End Sub

     

    #190519
    Admin
    Administrator

    what the error says?

    like item not define or something like that ❓

    #190518
    Admin
    Administrator

    LOL

     

    Dim window As Long
    
    On Error Resume Next
    window = FindWindow("my window class", vbNullString)
    PostMessage window, WM_COMMAND, 33027, 0

     

    well if you dont declare the function then its going to error.

    this needs to be delcared…
    FindWindow
    PostMessage
    WM_COMMAND

    without them decalred it wont.

    #190517
    MrAl3n
    Member

    Ok Thanks … Got It 😀

    #190516
    nikka
    Member

    this is east the hard thing is coding lol whice u need to get books for that

    #190515
    Admin
    Administrator

    no i never learned from books i learned from exsamples… there again everybody learns things diffrently some people need books to learn from. and if you have problems reading like me for exsample then books is not for you exsamples of others codes are good to learn from. however learning from others codes the code has to be clean or you needs atleast some years with crappy code to understand jibberish code.

    #190514
    roy
    Member

    so wen is the next tuturiol cumin up, i wana try my skills or try 2 learn it, well i started off wid c++ lets c where i’m headed.

    #190513
    poison
    Member

    😳 loco…you got me interested again with creating programs and websites…i graduated as a computer tech. @ heald college but never had a chance to use my profession…so i guess i’ll just use it here instead…i still have some of my projects back then when i was still in school…i’ll just review them as my reference…thanks man!

    #190512
    Admin
    Administrator

    You welcome its cool to program when we gots the time it keeps me from being bore i go crazy when i am bore so i program instead 🙂

    and share ur proggies with us when u do man 🙂

Viewing 15 posts - 1 through 15 (of 30 total)
  • You must be logged in to reply to this topic.