logo
What's New
What's New
  Popular
Popular
  Top Rated
Top Rated
  Search
Search


Search :  

How to Add Link |   Modify Link   |   Login |     Register  |  Getting Rated |  Link to Us |  Feedback Us


Sponsors
FlashAdvisor.com
Web Directory
Custom Offshore Software Development
phpld Hacks
Software Download
Your Site Link




Categories
    3DS MAX
    ASP
    C And C++
    ColdFusion
    Database
    Dreamweaver
    Flash
    HTML
    Java
    JavaScript
    Linux
    Maya
    MS Excel
    MS PowerPoint
    MS Word
    Paint Shop Pro
    Perl and CGI
    Photoshop
    PHP
    Premiere
    Python
    Visual Basic
    Web Hosting
    XML
 

 

Author Details
  All Tutorials by scudworkz

   1   


 Pad Program: Beginners Guide  By scudworkz

Rate It  | Review
Pad Program: Beginners Guide Create a well functioning pad program in Visual Basic, a beginners guide. Pad Program Although we are going to create a pad program, its only going to have basic functions and not go to advanced. This is aimed towards beginners who still haven't grasped many concepts of what visual basic is all about, so lets get started. First open visual basic (i'm using visual basic 6.0, some things might vary). If the 'New Project' Window doesn't open automatically, click File - New Project. We are going to create a Standard EXE. Most of the time that is the project you want to create. Here we get to work on our window (obviously). Windows are called forms when working with VB. If you look to the right of the program, you see different panels. The project panel is where we can view/add/delete all our different forms, or modules or anything of the sort (dont bother with this yet). Below that panel you see the properties panel. This is what we are about to edit in a moment.The drop down list shows you all the forms or objects you can work with. And everything inside the scrollable area are properties you can edit. Right now you need to change the form name to "frmScudpad". Then look a little lower and change caption to "Scudpad" If you noticed the name, it had a prefix of 'frm'. It's just commmon practice to give names their respectable object type prefix. But you'll learn more of that as you proceed. Moving on, you can stretch your form outwards by clicking the small 'boxes' on the sides of the form and dragging outwards. Go ahead, make the form you're working on right now a bit bigger. We're going to add a Menu bar. To do this, right click anywhere on your form (even the whitespace counts) and choose 'Menu Editor' First Menu We are going to create is going to be File. So add 'File' to the caption. The prefix for a menu is mnu, so in the name field add 'mnuFile'. When you do that, click the Next button. This time, we want to add a menu item to the main menu: file. So after pressing the next button, click the arrow pointing right. You should notice three dots appear. This means that the item will be a sub of whater is on top of it. First item we are going to put in here will be an Exit option. So for the caption, type Exit. For the name, type mnuFileitemExit (mnuFile because it's under the menu file, and item Exit because its a menu item named exit). We need to create another item under the file menu. So you should still have your 'exit' item seleted. If not, just click on it. Then press the insert button. This creates another item with the same parent of the item below it. Now create another item with the caption 'New' and the name 'mnuFileitemNew'. But this time also insert a hotkey (from the drop down list. Common sense is you should use ctrl + n with the New item. Don't worry if you didn't get the hang of it, you get a lot of opportunity for remembrance right now. You need to create a menu that has the following items. Remember though, menu's have names of mnu*menucaption* and menu items have names of mnu*menucaption*item*itemcaption*. You can also use the up/down arrows to arrange the positions (don't forget hotkeys). Once you got all that done press OK. Then you would probably want to preview it. To do this, just look at the toolbar and press the play button, or you could also press F5. It should look similair to mine: If you click any item in the menu, nothing happens. Well thats because we haven't defined any code to tell our program what to do on a click. More on that later on. Right now we need to get an area where text can be shown. Close the preview by closing the form or pressing the stop button. Look to the left of the program, you see our tools box. These are all objects you can insert into your form. For now, the only one we are going to add is the textbox (the white field with 'ab' in it). To add it, just double-click the button. A text field should be added to the form. Now you should expand the textfield to fit the form (although it doesn't matter because we will change how it sizes itself later). You should change it right now so it will look more or less like the final product (you might need to slightly resize the form as well). Once you do that, click on the text field to modify its properties. We need to name this text field txtPad (txt is the prefix for textfields). When you change the name scroll down and find the 'Text' property, empty that property so no text is displayed. To make the text field resize itself to fit the window, right click on the form (an empty area) and choose 'View Code'. This is where we can edit the BASIC code. But first we need to declare WHEN to take an action. So when you open the code window, you see two comboboxes. The first lets you choose an object in our project to edit. The 2nd combobox gives you options on WHEN to take an action. So Choose
   Hits:711    Rate:  2.0(out of 5)    Vote:2   Submit Date :2006-03-27
  Rate It   |  Error   |  Review
  Category: Home > Visual Basic > Introduction to Visual Basic


 Pad Program: Beginners Guide  By scudworkz

Rate It  | Review
Pad Program: Beginners Guide
   Hits:83    Rate:  0.0(out of 5)    Vote:0   Submit Date :2006-03-27
  Rate It   |  Error   |  Review
  Category: Home > Visual Basic > Introduction to Visual Basic



  
Home | Sitemap | Feedback | Advertise with us
Best viewed in 800x600 resolution with Internet Explorer.
Site Developed and Hosted by EthicSolutions

Flash Tutorials    TemplateAdvisor.com    WebMastersHome.com

    Reseller Hosting    Reseller Hosting Linux