Com 211 Oobasic Theory Book

Total Page:16

File Type:pdf, Size:1020Kb

Com 211 Oobasic Theory Book UNESCO-NIGERIA TECHNICAL & VOCATIONAL EDUCATION REVITALISATION PROJECT-PHASE II NATIONAL DIPLOMA IN COMPUTER TECHNOLOGY OOBASIC/VISUAL BASIC PROGRAMMING COURSE CODE: COM 211 YEAR I SEMESTER II THEORY Version 1: December ,2008 Table Of Contents WEEK 1 Concept of programming .................................................................................................. 4 Systems Development Cycle ............................................................................................ 4 How windows work .......................................................................................................... 5 WEEK 2 The Visual Basic environment .......................................................................................... 5 Starting Visual Basic ........................................................................................................ 7 Stopping Visual Basic ...................................................................................................... 8 Getting online help ........................................................................................................... 8 Opening Application...................................................................................................... 12 Creating Simple application ( Wizard ) ........................................................................... 12 Running your application ................................................................................................ 18 Creating Executable File ................................................................................................. 19 Saving your application .................................................................................................. 20 VB Character set ............................................................................................................ 22 Relational Operators ....................................................................................................... 22 Arithmetic Operators ..................................................................................................... 22 Blank character ............................................................................................................... 22 Data Types ..................................................................................................................... 22 WEEK 3 Declaring Variables ........................................................................................................ 26 Assigning Values to Variables ........................................................................................ 28 Mathematical Expressions .............................................................................................. 30 Conditional Operators ..................................................................................................... 33 WEEK 4 Properties of the Form .................................................................................................... 34 Intrinsic Controls ............................................................................................................ 37 Label control .................................................................................................................. 38 Text Box ........................................................................................................................ 40 Focus In on Controls ...................................................................................................... 42 The Command Button .................................................................................................... 42 The PictureBox Control .................................................................................................. 44 The Image Control .......................................................................................................... 46 WEEK 5 Creating non-wizard applications.................................................................................... 47 Adding Controls to applications ...................................................................................... 47 Managing Controls ........................................................................................................ 48 Change the control properties ......................................................................................... 48 Handling Control Event .................................................................................................. 57 Writing Code ................................................................................................................. 63 WEEK 6 If...Then...Else Statement ................................................................................................ 65 Select Case Statement ..................................................................................................... 67 OptionButton Control ..................................................................................................... 69 CheckBox Control .......................................................................................................... 72 Frame Control ................................................................................................................ 78 WEEK 7 Do...Loop Statement ....................................................................................................... 80 For...Next Statement ....................................................................................................... 81 Sub Statement................................................................................................................. 84 WEEK 8 Supplied Numeric Functions (Math Functions ) .............................................................. 88 Abs Function .................................................................................................................. 88 Int Functions .................................................................................................................. 88 Rnd Function .................................................................................................................. 89 Sqr Function ................................................................................................................... 90 Supplied String Function ................................................................................................ 90 Len Function .................................................................................................................. 90 2 LCase and Functions ...................................................................................................... 91 UCase Function .............................................................................................................. 91 Asc Function .................................................................................................................. 92 Chr Function .................................................................................................................. 92 Supplied Time And Date Functions ................................................................................ 93 Now Function ................................................................................................................. 93 Date Function ................................................................................................................. 93 Time Function ................................................................................................................ 93 WEEK 9Non-Arrays data values .................................................................................................. 94 Arrays data values .......................................................................................................... 94 Declaring Fixed-Size Arrays ........................................................................................... 95 Multidimensional Arrays ................................................................................................ 97 WEEK 10List Boxes Controls That Work Like Arrays ................................................................... 99 List Boxes: Controls That Work Like Arrays ................................................................ 109 WEEK 11 Combo Boxes ............................................................................................................... 117 The Timer Control ........................................................................................................ 122 Scrolling the Scroll Bars ............................................................................................... 124 WEEK 12 MsgBox Function ......................................................................................................... 128 InputBox Function ........................................................................................................ 131 WEEK 13 The Basic Elements of a Database ................................................................................ 133 WEEK 14 Using Data Control ....................................................................................................... 134 Data Access Objects (DAO) ......................................................................................... 136 Visual Basic Wizard ..................................................................................................... 137 Data Form Wizard .......................................................................................................
Recommended publications
  • Turbo Chameleon 64 Draft Version! (BETA-9)
    Turbo Chameleon 64 VGA, turbo, freezer and memory expansion for the Commodore-64 The Programmers Manual Peter Wendrich [email protected] February 11, 2014 Draft version! (BETA-9) 1 Contents 1 Introducing the Chameleon core 5 1.1 Turbo Chameleon Cartridge for the C64 . .5 1.2 Standalone Mode . .5 1.3 Docking Station . .5 2 Configuration Mode 5 2.1 Detecting a Chameleon . .5 2.2 Activating Configuration Mode . .6 2.3 Reconfigure the FPGA core . .6 2.4 Force menu mode . .6 2.5 Force reset from software . .6 3 Core version information 6 3.1 Version Registers . .7 4 Memory 7 4.1 Allocated memory ranges . .7 4.1.1 32 MByte Layout . .7 4.2 MMU Registers . .8 4.3 Memory Overlays (6510 CPU) . 10 5 Buttons 10 5.1 Buttons Configuration Register . 11 5.2 Last Button Pressed . 11 6 VGA Output 11 6.1 VGA Sync . 11 6.2 Frame buffers . 12 6.3 Scaling modes . 12 6.4 Scanline emulation . 12 6.5 VGA Registers . 13 6.6 Palette Registers . 14 6.7 Fixed Palette Entries . 14 7 VGA Status Lines 14 7.1 VGA Status Configuration Register . 15 8 Cartridge Emulation 16 8.1 Freezer Logic . 16 8.2 Clock port . 16 8.3 Simple ROM cartridges . 16 8.4 MMC64 . 17 8.4.1 MMC64 additional SPI devices . 17 8.5 RAM expansions . 17 8.5.1 REU (Ram Expansion Unit) 1700, 1750, 1764 . 18 8.5.2 REU Emulated Quirks . 18 8.5.3 REU Registers . 19 8.5.4 GeoRAM registers .
    [Show full text]
  • Exploring Student Perceptions About the Use of Visual Programming
    Exploring student perceptions about the use of visual programming environments, their relation to student learning styles and their impact on student motivation in undergraduate introductory programming modules Maira Kotsovoulou (BSc, MSc) July 2019 This thesis is submitted in partial fulfilment of the requirements for the degree of Doctor of Philosophy. Department of Educational Research, Lancaster University, UK. Exploring student perceptions about the use of visual programming environments, their relation to student learning styles and their impact on student motivation in undergraduate introductory programming modules Maira Kotsovoulou (BSc, MSc) This thesis results entirely from my own work and has not been offered previously for any other degree or diploma. The word count is 57,743 excluding references. Signature ........................................................ Maira Kotsovoulou (BSc, MSc) Exploring student perceptions about the use of visual programming environments, their relation to student learning styles and their impact on student motivation in undergraduate introductory programming modules Doctor of Philosophy, July 2019 Abstract My research aims to explore how students perceive the usability and enjoyment of visual/block-based programming environments (VPEs), to what extent their learning styles relate to these perceptions and finally to what extent these tools facilitate student understanding of basic programming constructs and impact their motivation to learn programming. My overall methodological approach is a case study that explores the nature of potential benefits to using a VPE in an introductory programming module, within the specific context of an English-speaking institution of higher learning in Southern Europe. Part 1 of this research is a pilot study, which uses participatory action research as a methodological practice to identify which visual programming environment will be selected for the main study.
    [Show full text]
  • Full Form of Basic in Computer Language
    Full Form Of Basic In Computer Language Arrased and intransitive Obadiah resit: which Rockwell is soused enough? Prentiss safeguards her nitromethane yesternight, she posed it drastically. How rustling is Morley when comelier and canescent Ned depolarize some banana? Learning pascal are usually, the extern modifier is defined in basic computer full language of sense 3 Popular Types of Computer Language eduCBA. Instead of using machine code it uses a programming language. Programming in one natural language say taken full scope set the English language. BASIC was to early programming language that is still despise the simplest and most popular of programming languages BASIC stands for Beginner's. It is practically impossible to teach good programming to students that have had one prior exposure to BASIC In its classic form BASIC also. Computer Related Full Form PDF For BoardCompetitive Examination BAL Basic Assembly Language BER Bit less Rate BFD Binary File. Included in computer language of computers can be covered in. All Full Forms for Computer Subjectpdf Domain Name. The basics of BASIC the programming language of the 190s. Learn then to program drawings animations and games using JavaScript ProcessingJS or learn how these create webpages with HTML CSS You implement share. Basic Computer Terms. Important Full Forms Related to Programming Languages. BASIC Commands Dartmouth College. An html tags that time and that you are defined rules, compilers convert the habit to create a language of in basic form computer full control. What both RAM & ROM Mean their Business Chroncom. PHP Full Form GeeksforGeeks. What is C The Basics of C Programming HowStuffWorks.
    [Show full text]
  • Download, Including1 17N REU, Ramlink Partition, Jimymon-64 (ML Monitor)
    C 0 T E T S ISSUE Published June 1996 COMMODORE WORLD 6 Wheels-Laying More Than A Patch THE NEWS MAGAZINE FOR COMMODORE 64 » 1'■ I 1J',[ K1. Bruce Thonuu 14 GOFA-A Modulap- Pcogpamming System Fob The Coeimodore 64 http://wviw.cmiweb.am/cwhtme.hlml George Flanagan General Manager Chinks ft Christiansen ♦ Editor Review; Doug Cot Ion ♦ 24 Software: Centipede 126 E>r Gaelwe R. Gasson Advegtisinq Sales A Look ai ihe Newesi Commodore I2S BBS Program Charles A. Christiansen (413) 525-0023 ♦ Graphic Acts Doug Cotton .UMN! '♦ 26 Jusr Fob Starters by Jason Compton Electronic Pre-Press & Pointing Maiuir/Holden Helpful Hints for Handling Disk Drives ♦ 30 Graphic Interpretation by Bruce Thomas Cover Design by Doug Cotton GEOS: For ti Good lime... 32 Carrier Detect by Gaelyne B. Gasson Tclecommunicationi News & Updates 36 S16 Beat by Mark Fellows Things to Look Out For When Program/Hint- the 65X16 Commodore1" and [he respective Commodore producl names are trademarks or registered trademarks of Commodore, a 38 Over The Edge by Jeffrey L. Jones division of Tulip Compulers. Commodore World is in no way aftiliated wilrtthe owner n! ".he Commodore logo ana technology. Commodore Programming in a SuperCPU World Commodore Worla (ISSN 1078-2515) is published 8 limos annually by Creative Micro Designs. Inc.. 15 Benton Drive, Easl Longrneadow MA 01028-0646. Secono-Class Postage Paid at EasL Longmeaflow MA. (USPS «)n-801| Annual subscnpiion rale is USS29.95 fci U.S. addresses. USS35.95(orC3nada0'Maiico.USSJS.95!orallECCounlnB5. Department paymanlsmusl be provided in U S. Dollars. Mail subscriptions 2 From the Editor to CW Subscriptions, do Crestiva Micro Designs.
    [Show full text]
  • ~ ARTISAN® with Experienced Engineers and Technicians on Staff
    Full-service, independent repair center -~ ARTISAN® with experienced engineers and technicians on staff. TECHNOLOGY GROUP ~I We buy your excess, underutilized, and idle equipment along with credit for buybacks and trade-ins. Custom engineering Your definitive source so your equipment works exactly as you specify. for quality pre-owned • Critical and expedited services • Leasing / Rentals/ Demos equipment. • In stock/ Ready-to-ship • !TAR-certified secure asset solutions Expert team I Trust guarantee I 100% satisfaction Artisan Technology Group (217) 352-9330 | [email protected] | artisantg.com All trademarks, brand names, and brands appearing herein are the property o f their respective owners. Find the Measurement Computing / CEC PC-488 at our website: Click HERE Program and documentation copyrighted 1986, 1998, 2003 by Capital Equipment Corporation (CEC). The software interpreter contained in EPROM/ROM is copyrighted and all rights are reserved by Capital Equipment Corporation. Copying or duplicating this product is a violation of law. Application software libraries provided on disk are copyrighted by Capital Equipment Corporation. The purchaser is granted the right to include portions of this software in products which use one of CEC's IEEE-488 interface boards (including those sold through resellers such as Keithley Instruments, etc.). The software may not be distributed other than for the application just mentioned. Purchasers of this product may copy and use the programming examples contained in this book. No other parts of this book may be reproduced or transmitted in any form or by any means, electronic, optical, or mechanical, including photocopying and recording, or by any information storage and retrieval system, without permission in writing from Capital Equipment Corporation.
    [Show full text]
  • BASIC Programming with Unix Introduction
    LinuxFocus article number 277 http://linuxfocus.org BASIC programming with Unix by John Perr <johnperr(at)Linuxfocus.org> Abstract: About the author: Developing with Linux or another Unix system in BASIC ? Why not ? Linux user since 1994, he is Various free solutions allows us to use the BASIC language to develop one of the French editors of interpreted or compiled applications. LinuxFocus. _________________ _________________ _________________ Translated to English by: Georges Tarbouriech <gt(at)Linuxfocus.org> Introduction Even if it appeared later than other languages on the computing scene, BASIC quickly became widespread on many non Unix systems as a replacement for the scripting languages natively found on Unix. This is probably the main reason why this language is rarely used by Unix people. Unix had a more powerful scripting language from the first day on. Like other scripting languages, BASIC is mostly an interpreted one and uses a rather simple syntax, without data types, apart from a distinction between strings and numbers. Historically, the name of the language comes from its simplicity and from the fact it allows to easily teach programming to students. Unfortunately, the lack of standardization lead to many different versions mostly incompatible with each other. We can even say there are as many versions as interpreters what makes BASIC hardly portable. Despite these drawbacks and many others that the "true programmers" will remind us, BASIC stays an option to be taken into account to quickly develop small programs. This has been especially true for many years because of the Integrated Development Environment found in Windows versions allowing graphical interface design in a few mouse clicks.
    [Show full text]
  • GWBASIC User's Manual
    GWBASIC User's Manual User's Guide GW-BASIC User's Guide Chapters 1. Welcome Microsoft Corporation 2. Getting Started Information in this document is subject to change without 3. Reviewing and Practicing notice and does not represent a commitment on the part of 4. The Screen Editor Microsoft Corporation. The software described in this 5. Creating and Using Files document is furnished under a license agreement or 6. Constants, Variables, nondisclosure agreement. It is against the law to copy this Expressions and Operators software on magnetic tape, disk, or any other medium for any Appendicies purpose other than the purchaser's personal use. A. Error Codes and Messages © Copyright Microsoft Corporation, 1986, 1987. All rights B. Mathematical Functions reserved. C. ASCII Character Codes D. Assembly Language Portions copyright COMPAQ Computer Corporation, 1985 E. Converting Programs Simultaneously published in the United States and Canada. F. Communications G. Hexadecimal Equivalents Microsoft®, MS-DOS®, GW-BASIC® and the Microsoft logo H. Key Scan Codes are registered trademarks of Microsoft Corporation. I. Characters Recognized Compaq® is a registered trademark of COMPAQ Computer Glossary Corporation. DEC® is a registered trademark of Digital Equipment Corporation. User's Reference Document Number 410130001-330-R02-078 ABS Function ASC Function ATN Function GW-BASIC User's Reference AUTO Command Microsoft Corporation BEEP Statement BLOAD Command Information in this document is subject to change without BSAVE Command notice and does not represent a commitment on the part of Microsoft Corporation. The software described in this CALL Statement document is furnished under a license agreement or CDBL Function nondisclosure agreement.
    [Show full text]
  • Basic Programmer's Guide Staroffice[TM] 7
    StarOfficeTM 7 Office Suite A SunTM ONE Software Offering Basic Programmer's Guide Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A. 650-960-1300 Part No. 817-1826-10 July 2003, Revision A Copyrights and Trademarks Copyright © 2003 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054. , U.S.A. All rights reserved. Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent applications in the U.S. and in other countries. This document and the product to which it pertains are distributed under licenses restricting their use, copying, distribution, and decompilation. No part of the product or of this document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers. This product is based in part on the work of the Independent JPEG Group and The FreeType Project. Portions Copyright 2000 SuSE, Inc. Word for Word Copyright © 1996 Inso Corp. International CorrectSpell spelling correction system Copyright © 1995 by Lernout & Hauspie Speech Products N.V. All rights reserved. Sun, Sun Microsystems, the Sun logo, Java, Solaris, StarOffice, the Butterfly logo, the Solaris logo, and the StarOffice logo are trademarks or registered trademarks of Sun Microsystems, Inc.
    [Show full text]
  • History of Micro-Computers
    M•I•C•R•O P•R•O•C•E•S•S•O•R E•V•O•L•U•T•I.O•N Reprinted by permission from BYTE, September 1985.. a McGraw-Hill Inc. publication. Prices quoted are in US S. EVOLUTION OF THE MICROPROCESSOR An informal history BY MARK GARETZ Author's note: The evolution of were many other applica- the microprocessor has followed tions for the new memory a complex and twisted path. To chip, which was signifi- those of you who were actually cantly larger than any that involved in some of the follow- had been produced ing history, 1 apologize if my before. version is not exactly like yours. About this time, the The opinions expressed in this summer of 1969, Intel was article are my own and may or approached by the may not represent reality as Japanese calculator manu- someone else perceives it. facturer Busicom to pro- duce a set of custom chips THE TRANSISTOR, devel- designed by Busicom oped at Bell Laboratories engineers for the Jap- in 1947, was designed to anese company's new line replace the vacuum tube, of calculators. The to switch electronic sig- calculators would have nals on and off. (Al- several chips, each of though, at the time, which would contain 3000 vacuum tubes were used to 5000 transistors. mainly as amplifiers, they Intel designer Marcian were also used as (led) Hoff was assigned to switches.) The advent of assist the team of Busi- the transistor made possi- com engineers that had ble a digital computer that taken up residence at didn't require an entire Intel.
    [Show full text]
  • Beginning Microsoft® Small Basic
    ® Beginning Microsoft Small Basic ® ® ® ™ Plus a Porting Guide to Microsoft Visual Basic , C# , and Java © PHILIP CONROD & LOU TYLEE, 2010 Kidware Software PO Box 701 Maple Valley, WA 98038 http://www.computerscienceforkids.com http://www.kidwaresoftware.com Copyright © 2010 by Philip Conrod & Lou Tylee. All rights reserved Kidware Software PO Box 701 Maple Valley, Washington 98038 1.425.413.1185 www.kidwaresoftware.com www.computerscienceforkids.com www.biblebytebooks.com All Rights Reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Printed in the United States of America ISBN-13: 978-1-937161-19-4 Book Cover Illustration by Kevin Brockschmidt Copy Editor: Stephanie Conrod This copy of the Beginning Microsoft Small Basic book and the associated software is licensed to a single user. Copies of the course are not to be distributed or provided to any other user. Multiple copy licenses are available for educational institutions. Please contact Kidware Software for school site license information. This guide was developed for the course, “Beginning Microsoft Small Basic,” produced by Kidware Software, Maple Valley, Washington. It is not intended to be a complete reference to the Small Basic language. Please consult the Microsoft website for detailed reference information. This guide refers to several software and hardware products by their trade names. These references are for informational purposes only and all trademarks are the property of their respective companies and owners. Microsoft, Visual Studio, Small Basic, Visual Basic, Visual J#, and Visual C#, IntelliSense, Word, Excel, MSDN, and Windows are all trademark products of the Microsoft Corporation.
    [Show full text]
  • BHT-BASIC Programmer's Manual
    Copyright © DENSO CORPORATION, 2000 All rights reserved. No part of this publication may be reproduced in any form or by any means without permission in writing from the publisher. Specifications are subject to change without prior notice. All products and company names mentioned in this manual are trademarks or registered trade- marks of their respective holders. BHT, CU, BHT-protocol, BHT-Ir protocol, and BHT-BASIC are trademarks of DENSO CORPO- RATION. Preface This manual describes the syntax and development procedure of BHT-BASIC 3.5 which is a programming language for developing application programs of the BHT-3000/BHT-4000/BHT- 5000/BHT-6000/BHT-6500/BHT-7000/BHT-7500 Bar Code Handy Terminals. It is intended for programmers who already have some experience in BASIC programming. For the basic description about the BASIC language, refer to documentations concerning Microsoft BASIC® or QuickBASIC®. For the details about Windows™, refer to the Microsoft Windows documentations. i How this book is organized This manual is made up of 18 chapters and appendices. Chapter 1. Software Overview for the BHT Surveys the software structure of the BHT and introduces the programs integrated in the ROM and the language features of BHT-BASIC. Chapter 2. Development Environment and Procedures Describes hardware and software required for developing application programs and the devel- oping procedure. Chapter 3. Program Structure Summarizes the basic structure of programs and programming techniques, e.g., program chaining and included files. Chapter 4. Basic Program Elements Describes the format of a program line, usable characters, and labels. Chapter 5. Data Types Covers data which the programs can handle, by classifying them into data types--constants and variables.
    [Show full text]
  • Lesson12 Visual Basic Functions- Part II
    II Disclaimer Visual Basic Made Easy- A complete tutorial for beginners is an independent publication and is not affiliated with, nor has it been authorized, sponsored, or otherwise approved by Microsoft Corporation. Trademarks Microsoft, Visual Basic, Excel, Acess and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. All other trademarks belong to their respective owners. Liability The purpose of this book is to provide a basic guide for people interested in Visual Basic® programming. Although every effort and care has been taken to make the information as accurate as possible, the author shall not be liable for any error, harm or damage arising from using the instructions given in this book. Copyright 2006 Liew Voon Kiong All rights reserved. No Part of this e-book may be reproduced, in any form or by any means,without permission in writing from the author. ISBN: 141962895X I Acknowledgement I would like to express my sincere gratitude to many people who have made their contributions in one way or another to the successful publication of this book. My special thanks go to my children Xiang, Yi and Xun. My daughter Xiang edited this book while my sons Yi and Xun contributed their ideas and even wrote some of the sample programs for this book. I would also like to appreciate the support provided by my beloved wife Kim Huang and my youngest daughter Yuan. I would also like to thank the million of visitors to my Visual Basic Tutorial website at www.vbtutor.net , especially those who contributed their comments, for their support and encouragement.
    [Show full text]