Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Visual basic ppt for tutorials computer

75,791 views

Published on

Published in: Technology
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • There is a REAL system that is helping thousands of people, just like you, earn REAL money right from the comfort of their own homes. The entire system is made up with PROVEN ways for regular people just like you to get started making money online... the RIGHT way... the REAL way. ■■■ http://scamcb.com/ezpayjobs/pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • D0WNL0AD FULL ▶ ▶ ▶ ▶ http://1lite.top/ZwRFF ◀ ◀ ◀ ◀
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • It's genuinely changed my life. I have been sleeping in the spare room for 4 months - and let's just say my sex life had become pretty boring! My wife and I were becoming strangers living in the same house. Thanks to your strategies, I am now back in our bed and the closeness and intimacy have returned. Thank you so much for taking the time to put all this together. It has genuinely changed my life. ▲▲▲ http://t.cn/Aigi9dEf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Visual basic ppt for tutorials computer

  1. 1. VISUAL BASIC
  2. 2. HOW TO WORK WITH VISUAL BASIC? <ul><li>Visual Basic (VB) is the third-generation event-driven programming language and integrated development environment (IDE) from Microsoft or its COM programming model. Visual Basic is relatively easy to learn and use.Visual Basic was derived from BASIC and enables the rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using Data Access Objects, Remote Data Objects, or ActiveX Data Objects, and creation of ActiveX controls and objects. Scripting languages such as VBA and VBScript are syntactically similar to Visual Basic, but perform differently. A programmer can put together an application using the components provided with Visual Basic itself. Programs written in Visual Basic can also use the Windows API, but doing so requires external function declarations.The final release was version 6 in 1998. Microsoft's extended support ended in March 2008 and the designated successor was Visual Basic .NET (now known simply as Visual Basic). </li></ul>
  3. 3. HOW TO START VISUAL BASIC? FIG.1.1 NEW PROJECT WINDOW TO START VISUAL BASIC,THE STEPS ARE- 1.CLICK ON START PROGRAMS MICROSOFT VISUAL BASIC STUDIO 6.0 MICROSOFT VISUAL BASIC 6.0 2.THE NEW PROJECT WINDOW APPEARS (FIG.1.1) THE NEW PROJECT WINDOW HAS THREE TABS:- 1)NEW: TO START A NEW PROJECT. 2)EXISTING: TO SELECT FROM A LIST OF EXISTING PROJECTS. 3)RECENT: TO SELECT FROM THE LIST OF RECENTLY OPENED PROJECTS.IN THE NEW TAB ,SELECT STANDARD.EXE APPLICATION .THIS OPENS THE MICROSOFT VISUAL BASIC WINDOW.
  4. 4. COMPONENTS OF VB WINDOW Project window Properties window Properties layout window Form window Tool box Tool bar Menu bar Title bar FIG 1.2 COMPONENTS OF WINDOW
  5. 5. <ul><li>TITLE BAR:- </li></ul><ul><li>THE TITLE BAR(FIG 1.3)APPEARS AT THE TOP OF THE </li></ul><ul><li>VB WINDOW AND DISPLAYS TITLE OF THE PROJECT. </li></ul><ul><li>BY DEFAULT THE VB GIVES NAME SUCH AS PROJECT1, </li></ul><ul><li>PROJECT 2 . </li></ul><ul><li>A VB APPLICATION WORKS ON 3 MODES:- </li></ul>FIG 1.3 TITLE BAR RUN MODE BREAK MODE DESIGN MODE
  6. 6. <ul><li>MENU BAR AND TOOL BAR </li></ul><ul><li>MENU BAR- </li></ul><ul><li>THE MENU BAR(FIG 1.4) CONSISTS OF </li></ul><ul><li>MANY DROP-DOWN MENUS.CLICKING ON ANY OF </li></ul><ul><li>THE OPTION OFTHE MENU BAR MAKES IT </li></ul><ul><li>ACTIVE. </li></ul><ul><li>TOOL BAR- </li></ul><ul><li>THE TOOL BAR(FIG 1.4) HAS BUTTONS THAT </li></ul><ul><li>PROVIDE SOME OF THE MENU OPTIONS. </li></ul>Menu bar Tool bar FIG 1.4 MENU BAR AND TOOL BAR
  7. 7. <ul><li>FORM WINDOW </li></ul><ul><li>THE FORM WINDOW(FIG1.5) </li></ul><ul><li>IS THE PRIMARY WORK </li></ul><ul><li>AREA THAT FORMS THE </li></ul><ul><li>BACKGROUND OF THE </li></ul><ul><li>APPLICATION .THE USER </li></ul><ul><li>CAN DRAW OBJECTS ON </li></ul><ul><li>THE FORM. </li></ul>FIG. 1.5 FORM WINDOW
  8. 8. <ul><li>TOOLBOX </li></ul><ul><li>THE TOOLBOX (FIG 1.6)CONTAINS ICONS </li></ul><ul><li>THAT REPRESENT COMMONLY USED </li></ul><ul><li>CONTROLS SUCH AS LABEL,TEXTBOX, </li></ul><ul><li>COMMAND BUTTON ,ETC. </li></ul>FIG 1.6 TOOLBOX
  9. 9. <ul><li>PROJECT WINDOW </li></ul><ul><li>IT DISPLAYS A LIST OF ALL FORMS THAT MAKES UP </li></ul><ul><li>THE APPLICATION.IT HAS THREE BUTTONS ON THE </li></ul><ul><li>TOP LEFT.(FIG 1.7) </li></ul><ul><li>1.CLICK ON VIEW OBJECT TO OPEN A FORM. </li></ul><ul><li>2.CLICK ON VIEW CODE TO OPEN CODE WINDOW. </li></ul>View Code View object Select form FIG 1.7 PROJECT WINDOW
  10. 10. <ul><li>PROPERTIES WINDOW </li></ul><ul><li>THE PROPERTIES WINDOW LISTS THE PROPERTY OF THE SELECTED </li></ul><ul><li>CONTROLS OR FOR THE FORM. </li></ul><ul><li>THE PROPERTY WINDOW HAS TWO TABS: </li></ul><ul><li>1.THE ALPHABETIC TAB LIST ALL THE PROPERTIES IN ALPHABETIC ORDER.(FIG 1.8) </li></ul><ul><li>2.THE CATEGORIZED TAB LISTS THE PROPERTIES CATEGORY- </li></ul><ul><li>WISE(FIG 1.9) </li></ul>FIG 1.8 ALPHABETIC TAB OF PROPERTIES WINDOW FIG 1.9 CATEGORIZED TAB OF PROPERTIES WINDOW
  11. 11. <ul><li>FORM LAYOUT WINDOW </li></ul><ul><li>IT SHOWS THE POSITION OF THE </li></ul><ul><li>FORM RELATIVE TO THE MONITOR’S </li></ul><ul><li>SCREEN WHEN THE PROGRAM IS </li></ul><ul><li>EXECUTED.(FIG 1.10) </li></ul>FIG 1.10 FORM LAYOUT WINDOW FAST FORWARD TO VIEW FORM LAYOUT WINDOW PRESS SHIFT+F4
  12. 12. DEVELOPMENT OF AN APPLICATION <ul><li>IN VB, AN APPLICATION CAN BE DEVELOPED BY THE </li></ul><ul><li>FOLLOWING STEPS: </li></ul><ul><li>1.CREATE A FORM </li></ul><ul><li>2.PLACE CONTROLS ON TE FORM </li></ul><ul><li>3.SET PROPERTIES OR THE CONTROL </li></ul><ul><li>4.ADD CODE TO THE HANDLE THE EVENTS </li></ul><ul><li>THE CONTROLS IN THE TOOLBOX CAN BE CALLED OBJECTS IN </li></ul><ul><li>VB.EVERY CONTROL IS ASSOCIATED WITH ITS INDIVIDUAL </li></ul><ul><li>PROPERTIES ,METHODS AND EVENTS. </li></ul>
  13. 13. <ul><li>PROPERTY </li></ul><ul><li>IT IS THE NAMED ATTRIBUTE OF AN OBJECT </li></ul><ul><li>FOR EXAMPLE,THE TEXT BOX HAS PROPERTIES </li></ul><ul><li>SUCH AS COLOR,FONT,ENABLED,VISIBLE,ETC. </li></ul><ul><li>METHOD </li></ul><ul><li>IT IS AN ACTION THAT CAN BE PERFORMED ON </li></ul><ul><li>AN OBJECT. </li></ul><ul><li>EVENT </li></ul><ul><li>WE KNOW THAT VB IS AN EVENT-DRIVEN PROGRAMMING </li></ul><ul><li>LANGUAGE.A TEXT BOX SUPPORTS VARIOUS EVENTS SUCH AS </li></ul><ul><li>CLICK,DOUBLE-CLICK,MOUSE UP ETC.WHEN AN </li></ul><ul><li>EVENT OCCURS,A PARTICULAR CODE IS EXECUTED </li></ul>
  14. 14. HOW TO PLACE CONTROLS ON THE FORM? <ul><li>A CONTOL CAN BE PLACED ON A FORM USING TWO </li></ul><ul><li>METHODS. </li></ul><ul><li>FIRST METOD </li></ul><ul><li>DOUBLE CLCK ON THE CONTROL IN THE ICON IN THE TOOLBOX. </li></ul><ul><li>THE CONTROL APPEARS IN THE MIDDLE OF FORM.(FIG 1.11) </li></ul>FIG 1.11 CONTROL ON THE FORM
  15. 15. <ul><li>TO CHANGE THE POSITION OF THE CONTROL : </li></ul>FIG 1.12 DRAGGING THE CONTROL <ul><li>TO RESIZE THE CONTROL JUST CLICK ON THE CONTROL AND RESIZE THE POINTERS ON ITS EDGES AND CORNERS. </li></ul><ul><li>i.DRAG THE EDGES POINTER FOR CHANGING THE SIZE EITHER HORIZONTALLY OR VERTICALLY.[FIG 1.13(a)] </li></ul><ul><li>ii.DRAG THE CORNER POINTERS FOR CHANGING THE SIZE DIAGONALLY.[FIG 1.13(b)] </li></ul>FIG 1.13(a) RESIZING CONTROL VERTICALLY FIG 1.13(b) RESIZING DIAGONALLY DRAG IT TO THE NEW LOCATION. (FIG.1.12) CLICK THE CONTROL
  16. 16. <ul><li>SECOND METHOD </li></ul><ul><li>CLICK ON THE CONTROL ICON IN THE TOOLBOX AND THEN CLICK ON THE DESIRED LOCATION ON THE FORM.DRAG THE MOUSE DIAGONALLY SO THAT THE CONTROL HAS THE DESIRED SIZE.(FIG 1.14) </li></ul><ul><li>TO REPOSITION THE CONTROL ,HOLD DOWN THE LEFT MOUSE BUTTON AND DRAG THE CONTROL TO A NEW LOCATION, </li></ul><ul><li>TO RESIZE THE CONTROL,CLICK THE CONTROL,DRAG ONE OF ITS EDGES OR CORNERS. </li></ul>FIG 1.14 DRAGGING DIAGONALLY
  17. 17. <ul><li>DELETE A CONTROL </li></ul>FORM OBJECT TO CREATE A VB APPLICATION ,WE NEED AN INTERFACE FOR THE USER TO INTERACT.THE FORM IS WHERE THE INTERFACE IS DRAWN.SOME OF THE COMMON PROPERTIES , EVENTS AND METHODS ARE: CLICK ON DELETE
  18. 18. <ul><li>PROPERTIES </li></ul><ul><li>CAPTION : IT SETS THE TITLE OF THE FORM </li></ul><ul><li>NAME : IT GIVES THE NAME OF THE FORM WITH WHICH IT IS </li></ul><ul><li>REFERRED TO IN THE CODE.THE DEFAULT VALUE IS FORM. </li></ul><ul><li>APPEARANCE: VALUE 1 MAKES THE FORM LOOK LIKE THREE- </li></ul><ul><li>DIMENSIONAL.VALUE 0 MAKES THE FORM LOOK </li></ul><ul><li>FLAT. </li></ul><ul><li>FONT: IT SETS THE FONT TYPE ,FONT STYLE AND FONT SIZE </li></ul><ul><li>FOR THE TEXT. </li></ul><ul><li>FORE COLOR : IT SETS THE COLOR FOR THE TEXT ON THE FORM. </li></ul><ul><li>ENABLED: VALUE TRUE MAKES THE FORM RESPOND TO MOUSE </li></ul><ul><li>AND KEYBOARD EVENTS.VALUE FALSE MAKES THE </li></ul><ul><li>FORM RESPONDING TO ANY EVENT. </li></ul><ul><li>BACK COLOR: IT SETS THE FORM’S BACKGROUND COLOR. </li></ul><ul><li>VISIBLE: VALUE FALSE MAKES THE FORM INVISIBLE </li></ul>
  19. 19. <ul><li>EVENTS </li></ul><ul><li>CLICK FORM-CLICK EVENT IS TRGGERED WHEN </li></ul><ul><li>THE USER CLICKS ON THE FORM . </li></ul><ul><li>LOAD FORM-LOAD EVENT IS TRIGGERED WHEN </li></ul><ul><li>THE FORM I LOADED.THIS LOADS THE </li></ul><ul><li>FORM INTO THE MEMORY. </li></ul><ul><li>METHODS </li></ul>PRINT THIS PRINTS TEXT STRING ON THE FORM. SHOW THIS MAKES THE FORM VISIBLE.IT IS THE SAME AS SETTING A FORM’S VISIBLE PROPERTY ON TRUE. HIDE THIS MAKES THE FORM INVISIBLE
  20. 20. LET US SEE HOW A VB APPPLIATION IS CREATED AND EXECUTED <ul><li>SUPPOSE WE WANT TO DISPLAY A MESSAGE ‘LEARNING VISUAL BASIC </li></ul><ul><li>IS FUN’ ON THE FORM.THE STEPS TO CREATE EXEXCUTE AND SAVE VB </li></ul><ul><li>APPLICATION FOR THIS MESSAGE ARE: </li></ul>CLICK ON START 1)
  21. 21. MICROSOFT VISUAL STUDIO CLICK PROGRAMS CLICK MICROSOFT VISUAL BASIC STUDIO 5) THEN CLICK ON MICOSOFT VISUAL BASIC 6.0 33 3) 4)
  22. 22. <ul><li>4.MAKE SURE FORM IS SELECTED IN THE PROJECT </li></ul><ul><li>EXPLORER WINDOW. </li></ul><ul><li>5.IN THE PROPERTIES WINDOW </li></ul><ul><li>i.CHANGE THE CAPTION MESSAGE. </li></ul><ul><li>ii.SELECT THE BACKCOLOR OF THE FORM.CLICK ON THE </li></ul><ul><li>DROP-DOWN ARROW ON THE RIGHT OF BACK COLOR </li></ul><ul><li>AND SELECT A COLOR.MAKE SURE THE PALLETE TAB IS </li></ul><ul><li>SELECTED.(FIG 1.16) </li></ul>FIG 1.16 BackColor Property
  23. 23. <ul><li>iii.SELECT THE FONT CLICK ON THE BUTTON TO THE RIGHT WITH THREE DOTS(FIG 6.17).THE FONT WINDOW APPEARS.(FIG 6.18) </li></ul>FIG 6.17 FONT PROPERTY FIG 1.18 FONT WINDOW
  24. 24. <ul><li>iv.SET THE FONT AS ARIAL,FOBT STYLE AS BOLD AND SZE AS 18;AND CLICK ON OK. </li></ul><ul><li>6.TO WRITE THE CODE: </li></ul><ul><li>i. DOUBLE-CLICK ANYWHERE ON THE FORM TO GET THE </li></ul><ul><li>CODE TEMPLATE(FIG 1.19). </li></ul><ul><li>ii. BETWEEN THE TWO LINESOF THE TEMPLATE,TYPE THE FOLLOWING CODE(FIG 1.20) </li></ul>FIG 1.19 CODE TEMPLATE FIG 1.20 VB CODE
  25. 25. <ul><li>7.TO SAVE THIS VB APPLICATION: </li></ul><ul><li>i. SELECT FILE SAVE TO FIRST SAVE THE FORM(FIG </li></ul><ul><li>1.21) AND THEN THE PROJECT (FIG 1.22). </li></ul><ul><li>8.TO RUN THIS VB APPLICATION: </li></ul><ul><li>i. PRESS F5 OR CLICK THE START BUTTON ON THE </li></ul><ul><li>TOOL BAR.(FIG 1.23) </li></ul>FIG 1.23 START BUTTON ON TOOLBAR Start button FIG 1.21 SAVE FROM FIG 1.22 SAVE PROJECT
  26. 26. <ul><li>9.THE OUTOUT OF THIS VB APPLICATION IS SHOWN IN (FIG 1.24). </li></ul>FIG 1.24 OUTPUT OF THE VB CODE FAST FORWARD TO RUN A PROGRAM PRESS F5
  27. 27. COMMON CONTROLS <ul><li>POINTER </li></ul><ul><li>THE POINTER PROVIDES THE WAY TO </li></ul><ul><li>RESIZE OR MOVE THE OTHER CONTROLS. </li></ul><ul><li>THIS IS AUTOMATICALLY ACTIVATED </li></ul><ul><li>AFTER THE USER PLACES A CONTROL ON </li></ul><ul><li>THE FORM. </li></ul>TOP TIP THE POINTER IS THE ONLY CONTROL IN THE TOOLBOX THAT CANNOT BE PLACED ON THE FORM
  28. 28. <ul><li>LABEL </li></ul><ul><li>LABEL IS A CONTROL THAT CAN BE USED TO DISPLAY </li></ul><ul><li>TEXT THAT USER CAN EDIT DIRECTLY. </li></ul><ul><li>PROPERTIES </li></ul><ul><li>NAME: THIS GIVES THE NAME USED TO REFER LABEL IN THE CODE. </li></ul><ul><li>CAPTION: THIS IS THE TEXT DISPLAYED IN THE LABEL. </li></ul><ul><li>FONT: THIS SETS FONT,FONT STYLE AND FONT SIZE. </li></ul><ul><li>BORDER STYLE: THIS DETERMINES THE TYPE OF BORDER. </li></ul><ul><li>APPEARANCE: THIS IS 3-D IN APPEARANCE. </li></ul><ul><li>EVENTS </li></ul><ul><li>CLICK: THIS EVENT IS TRIGGERED WHEN THE USER CLICKS ON THE </li></ul><ul><li>LABEL. </li></ul><ul><li>DOUBLE CLICK: THIS EVENT IS TRIGGERED WHEN TH USER DOUBLE- </li></ul><ul><li>CLICKS ON THE LABEL </li></ul>
  29. 29. <ul><li>TEXTBOX </li></ul><ul><li>THE TEXT BOX IS A CONTROL THAT IS USED </li></ul><ul><li>TO RECEIVE INPUT FROM THE USER AND ALSO </li></ul><ul><li>TO DISPLAY THE OUTPUT.IT CAN HANDLE </li></ul><ul><li>STRING(TEXT) AND NUMERIC DATA BUT NOT </li></ul><ul><li>PICTURE OR IMAGES. </li></ul><ul><li>PROPERTIES </li></ul><ul><li>NAME: THIS IS THE NAME USED TO REFER TO THE </li></ul><ul><li>TEXTBOX IN THE CODE. </li></ul><ul><li>APPEARANCE: THIS IS 3-D OR FLAT IN APPEARANCE </li></ul><ul><li>MAXLENGTH: THIS LIMITS THE LENGTH OF THE TEXT. </li></ul><ul><li>VALUE 0 INDICATES LIMITED LENGTH. </li></ul><ul><li>MULTILINE: THIS SPECIFIES WHETHER THE TEXTBOX </li></ul><ul><li>DISPLAYS A SINGLE LINE OR MULTIPLE </li></ul><ul><li>LINES. </li></ul>
  30. 30. <ul><li>PASSWORD CHAR: THIS HIDES THE TEXT WITH A </li></ul><ul><li>SINGLE CHARACTER(USUALLY * IS </li></ul><ul><li>USED). </li></ul><ul><li>ENABLED: VALUE TRUE/FALSE DETERMINES WHETHER </li></ul><ul><li>THE TEXTBOX RESPONDS TO ANY EVENT OR </li></ul><ul><li>NOT. </li></ul><ul><li>LOCKED: VALUE TRUE/FALSE DETERMINES WHETHER </li></ul><ul><li>THE TEXTBOX RESPONDS TO ANY EVENT OR </li></ul><ul><li>NOT. </li></ul><ul><li>LOCKED: VALUE TRUE/FALSE DETERMINES WHETHER </li></ul><ul><li>THE TEXTBOX CONTENTS CAN BE CHANGED OR </li></ul><ul><li>NOT. </li></ul><ul><li>TEXT: THIS IS THE STRING TO BE DISPLAYED IN THE </li></ul><ul><li>TEXTBOX. </li></ul><ul><li>EVENTS </li></ul><ul><li>CHANGE: THIS EVENT IS TRIGGERED EVERY TIME WHEN </li></ul><ul><li>THE TEXTBOX DISPLAYS A SINGLE LINE OR </li></ul><ul><li>MULTIPLE LINE. </li></ul>
  31. 31. <ul><li>METHOD </li></ul><ul><li>SetFocus: THIS POSITIONS THE CURSOR INSIDE THE TEXT BOX. </li></ul><ul><li>COMMAND BUTTON </li></ul><ul><li>THE COMMAND BUTON IS VERY IMPORTANT CONTROL AS IT IS </li></ul><ul><li>USED TO EXECUTE COMMANDS AND IT DISPLAYS AN ILLUSION </li></ul><ul><li>THAT THE BUTTON IS PRESSEDWHEN THE USER CLICKS ON IT. </li></ul><ul><li>PROPERTIES </li></ul><ul><li>APPEARANCES: THIS IS 3-D OR FLAT IN APPEARANCE. </li></ul><ul><li>CAPTION: THIS IS THE STRING THAT IS DISPLAYED ON THE </li></ul><ul><li>COMMAND BUTTON. </li></ul><ul><li>VISIBLE: VALUE TRUE/FALSE DETERMINES WHETHER IT IS VISIBLE </li></ul><ul><li>OR NOT. </li></ul><ul><li>FONT: THIS SETS FONT,FONT STYLE AND FONT SIZE. </li></ul><ul><li>ENABLED: VALUE TRUE/FALSE DETERMINES WHETHER IT RESPONDS </li></ul><ul><li>TO AN EVENT OR NOT. </li></ul><ul><li>EVENTS </li></ul><ul><li>CLICK: THIS EVENT IS TRIGGERED WHEN IT IS SELECTED BY CLIICKING </li></ul><ul><li>ON IT. </li></ul>
  32. 32. LET US NOW CREATE AN APPLICATION USING ALL THE COMMANDS DISCUSSED PREVIOUSLY <ul><li>THE STEPS TO CREATE ,EXECUTE AND SAVE A VB </li></ul><ul><li>APPLICATION ARE : </li></ul><ul><li>1)SELECT PROGRAMS </li></ul><ul><li>MICROSOFT VISUAL BASIC 6.0. </li></ul><ul><li>2)IN THE NEW PROJECT WINDOW,SELECT STANDARD. </li></ul><ul><li>EXE.TH FORM WILL APPEAR ON THE SCREEN. </li></ul><ul><li>3)NOTICE THAT THE PROPERTIES OF THE FORM WILL APPEAR IN THE PROPERTIES WINDOW. </li></ul><ul><li>i. SELECT CAPTION , AND TYPE ‘DISPLAY MESSAGE’. </li></ul><ul><li>ii SELECT BackColor , AND CHANGE IT TO ORANGE.(FIG 1.25) </li></ul>
  33. 33. <ul><li>4)PLACE THE LABEL ON THE FORM AND CHANGE ITS </li></ul><ul><li>PROPERIES AS SHOWN BELOW: </li></ul><ul><li>PROPERTIES SETTINGS </li></ul><ul><li>CAPTION ENTER YOUR NAME </li></ul><ul><li>FONT 12,BOLD </li></ul><ul><li>BackColor SAME AS FORM </li></ul><ul><li>5)PLACE ANOTHER LABEL ON THE FORM AND CHANGE IN PROPERTIES AS SHOWN BELOW: </li></ul><ul><li>PROPERTIES SETTINGS </li></ul><ul><li>NAME lblmessage </li></ul>FIG 1.25 CHANGED CAPTION AND BackColor
  34. 34. <ul><li>CAPTION (BLANK)[DELETE LABEL 2 THAT APPEARS ON THE </li></ul><ul><li>RIGHT SIDE] </li></ul><ul><li>BorderStyle 1-FIXED SINGLE </li></ul><ul><li>FONT 12,BOLD </li></ul><ul><li>6) PLACE THE TEXTBOX ON THE FORM AND CHANGE ITS PROPERTIES AS SHOWN BELOW: </li></ul><ul><li>PROPERTIES SETTING </li></ul><ul><li>NAME txtname </li></ul><ul><li>TEXT (BLANK) </li></ul><ul><li>FONT 12,BOLD </li></ul><ul><li>7)PLACE COMMAND BUTON ON THE FORM AND CHANGE ITS PROPERTIES AS SHOWN BELOW: </li></ul><ul><li>PROPERTIES SETTING </li></ul><ul><li>NAME cmdok </li></ul><ul><li>CAPTION OK </li></ul><ul><li>FONT 12,BOLD </li></ul><ul><li>8)PLACE ANOTHER COMMAND BUTTON ON THE FORM AND </li></ul><ul><li>CHANGE ITS PROPERTIES AS SHOWN BELOW: </li></ul>
  35. 35. <ul><li>PROPERTIES CONTROLS </li></ul><ul><li>NAME cmdEXIT </li></ul><ul><li>CAPTION EXIT </li></ul><ul><li>FONT 12 ,BOLD </li></ul><ul><li>9)TO WRITE THE CODE,DOUBLE-CLICK ON THE OK </li></ul><ul><li>COMMAND BUTTON TO GET THE CODE TEMPLATE.WRITE </li></ul><ul><li>THE CODE AS SHOWN IN FIG 1.26 </li></ul><ul><li>10)CLICK ON THE VIEW OBJECT BUTTON IN THE PROJECT </li></ul><ul><li>EXPLORER WINDOW TO RETURN TO THE FORM. </li></ul><ul><li>11)DOUBLE-CLICK ON THE EXIT COMAND BUTTON TO GET </li></ul><ul><li>CODE TEMPLATE.WRITE THE CODE AS SHOWN IN </li></ul><ul><li>FIG.1.27 </li></ul>FIG 1.26 VB CODE
  36. 36. <ul><li>12) TO SAVE THIS VB APPLICATION,SELECT FILE </li></ul><ul><li>SAVE PROJECT AS .THIS FIRST SAVES THE FORM AND </li></ul><ul><li>THEN THE PROJECT. </li></ul><ul><li>13)TO RUN THIS APPLICATION,PRESS F5 OR CLICK THE </li></ul><ul><li>START BUTTON ON THE TOOLBAR. </li></ul><ul><li>TRICKY TERMS </li></ul><ul><li>GUI- (GRAPHICAL USER INTERFACE)IT ENABLES THE USER TO </li></ul><ul><li>INTERACT WITH AN APPLICATIONTHROUGH THE USE OF </li></ul><ul><li>ICONS,BUTTONS,MENUS,DIALOG BOXES AND WINDOWS. </li></ul><ul><li>EVENT-DRIVEN PROGRAMMING- A PROGRAMMING BASED ON </li></ul><ul><li>THE EVENT(ACTION)PERFORMED. </li></ul><ul><li>INTEGRTED DEVLOPMENT ENVIRONMENT- INTEGRATING MANY DIFFERENT FUNCTIONS SUCH AS DESIGNING,EDITING,COMPILING, </li></ul><ul><li>DEBUGGING IN A SINFGLE WINDOW. </li></ul>FIG 1.27 VB CODE
  37. 37. THANK YOU
  38. 38. MADE BY- MANTHAN SOMVANSHI AHLCON INTERNATIONAL SCHOOL

×