Manipulating Files CHAPTER 3

Total Page:16

File Type:pdf, Size:1020Kb

Manipulating Files CHAPTER 3 04 2773 Ch03 10/19/01 12:24 PM Page 33 Manipulating Files CHAPTER 3 IN THIS CHAPTER • The FileSystem and File Controls 35 • The Windows CE TreeView Control 36 • Creating the PocketExplorer Utility 37 04 2773 Ch03 10/19/01 12:24 PM Page 34 eMbedded Visual Basic: Windows CE and Pocket PC Mobile Applications 34 Most Visual Basic programmers today access files through the familiar Win32 File System Object (commonly called the fso). The fso provides an easy-to-use and quick-to-develop-with object model that works for most text file applications. When it comes to binary or random access, the fso falters, and VB developers then turn to what’s often called free filing—probably named as such due to using the FreeFile() method to get an available file number. Free filing is an older, procedural-based method of access files that’s valid for any file access, but isn’t quite as easy to use as the object-oriented fso. Although the eVB’s FileSystem and File controls don’t have the extensive object model that the fso has, they provide just about everything developers could want or need for accessing any type of file-binary or text, sequential or random. In fact, I find that using these controls has distinct advantages over file programming in Win32 because they wrap the functionality of both free filing and the fso in a nice, compact set of methods and properties. Whether accessing small text configuration files or large binary data files, the FileSystem and File controls are all you’ll need. This chapter explores some of the functionality behind the two controls in the MSCEFileCtl library: FileSystem and File. The controls’ uses are limited only by the applications in which they are used and by your coding imagination; an exhaustive treatment of all the entire library’s uses could be a book in itself. We’ll cover some of their more common uses, give you ideas on where else you might use them, and add in the use of the TreeView control as well. In this chapter you will • Learn about the object models for the FileSystem and File controls • Discover the differences between the FileControl functions and Visual Basic’s well- known File System Object (fso) • Learn about the object model for the native CE TreeView control • Read and traverse a directory tree • Use the Open, Read, Write, and Close text files • See how to retrieve file attributes, such as size and modify date • Examine how to minimize the impact of the CreateObject memory leak • Work around the lack of support for properties As we’ll do with all chapters, we will also uncover some of eVB’s more subtle nuances that can cause problems and headaches, as well as give coding tips applicable to any eVB application. 04 2773 Ch03 10/19/01 12:24 PM Page 35 Manipulating Files 35 CHAPTER 3 The FileSystem and File Controls The Microsoft FileSystem and File controls are distributed with the platform SDK for each CE platform. They are both included in the MSCEFile.dll library. Controls are added to projects in eVB in the same manner as in other versions of Visual Basic (by choosing Components from the Tools menu). You can add the File and FileSystem controls specifically to your project via the Microsoft CE FileSystem Control 3.0 component library (see Figure 3.1). 3 M ANIPULATING F FIGURE 3.1 ILES Adding the FileSystem control library to your project. Adding the reference places both controls into the eVB toolbox. The File control’s button shows a small file icon, whereas the FileSystem control shows a small two-drawer filing cabinet (see Figure 3.2). The Controls’ Object Models This chapter will cover a large amount of the File and FileSystem controls’ object models. Covering the entire object model for any library in a single project is difficult and often impractical. Many methods are used in just about every project, whereas others are used only for specific, narrowly focused uses. The following is a list of the methods and properties used in this chapter: File Control FileSystem Control Close Dir Input FileDateTime LinePrint FileLen Open GetAttr EOFKill 04 2773 Ch03 10/19/01 12:24 PM Page 36 eMbedded Visual Basic: Windows CE and Pocket PC Mobile Applications 36 File control FileSystem control FIGURE 3.2 The eVB toolbox with the standard controls, the File control and the FileSystem control. As a reference guide, Appendix A includes all the object models for the File and FileSystem controls. The Windows CE TreeView Control The application developed in this chapter provides a pretty good look at the Windows CE ver- sion of the familiar TreeView control. As you can expect, the object model is smaller and the features are fewer than what you get with the Win32 TreeView control, but it’s sufficiently robust to provide all the common functionality TreeViews are used for without having to hunt for or write your own custom control. The following is a list of the TreeView control’s methods and properties used in this chapter: Close Input LinePrint Open EOF Dir 04 2773 Ch03 10/19/01 12:24 PM Page 37 Manipulating Files 37 CHAPTER 3 FileDateTime FileLen GetAttr Kill Again, I feel it’s useful to have a full object model reference to be able to refer to in not only this project, but for any other project you work on as well. Appendix A lists the full object model for the Windows CE TreeView control. The TreeView is in its own control library, MSCETreeView.dll, and, just like the FileSystem and File controls, can be added to a project’s toolbox through the Project Components dialog. Simply select Microsoft Windows CE Treeview Control 3.0. Creating the PocketExplorer Utility The best way to familiarize yourself with the FileSystem and File controls is to dive in and begin using them for a meaningful purpose. To do that, we’re going to write a small utility application called PocketExplorer that’s somewhat of a mix between the standard Windows Explorer and Notepad. 3 PocketExplorer will allow you to navigate through all the folders on your PocketPC as well as M ANIPULATING view the files within the folders and their attributes. It will also allow you to open and edit any F file, though only in text mode. ILES Setting Up the Project PocketExplorer uses two forms—frmMain and frmView—and one module, modMain. Listings 3.1 and 3.2 contain all the heading information for frmMain and frmView, respec- tively. For clarity, I have included listings only for properties that I modified from their defaults. Figure 3.3 shows what my project looks like. LISTING 3.1 Heading Information from frmMain.ebf Begin VB.Form frmMain Caption = “PocketExplorer” ClientHeight = 4005 ClientLeft = 60 ClientTop = 840 ClientWidth = 3630 ShowOK = -1 ‘True Begin FILECTLCtl.FileSystem fsMain Left = 2220 04 2773 Ch03 10/19/01 12:24 PM Page 38 eMbedded Visual Basic: Windows CE and Pocket PC Mobile Applications 38 LISTING 3.1 Continued Top = 180 _cx = 2200 _cy = 1400 End Begin MSCETREEVIEWLibCtl.TreeViewCtl tvwFolders Height = 1755 Left = 30 Top = 0 Width = 3555 LabelEdit = 1 LineStyle = 1 PathSeparator = “/” Style = 6 End Begin VBCE.Label lblFiles Height = 255 Left = 2160 Top = 3720 Width = 495 Caption = “Files:” Alignment = 1 End Begin VBCE.CommandButton cmdDelete Height = 315 Left = 1380 Top = 3660 Width = 615 Caption = “Del” End Begin VBCE.CommandButton cmdNew Height = 315 Left = 720 Top = 3660 Width = 615 Caption = “New” End Begin VBCE.ComboBox cboFilter Height = 300 Left = 2700 Top = 3660 Width = 855 Text = “” End Begin VBCE.CommandButton cmdEdit 04 2773 Ch03 10/19/01 12:24 PM Page 39 Manipulating Files 39 CHAPTER 3 LISTING 3.1 Continued Height = 315 Left = 60 Top = 3660 Width = 615 Caption = “Edit” Enabled = 0 ‘False End Begin VBCE.ListBox lstFiles Height = 1785 Left = 30 Top = 1800 Width = 3555 End End NOTE Listings 3.1 and 3.2 don’t show the entire headings, but show all control settings that 3 I’ve changed from their defaults. M ANIPULATING F ILES LISTING 3.2 Heading Information from frmView.ebf Begin VB.Form frmView Caption = “FileName” ClientHeight = 4005 ClientLeft = 60 ClientTop = 345 ClientWidth = 3630 ShowOK = -1 ‘True Begin VBCE.CommandButton cmdSave Height = 375 Left = 2400 Top = 3600 Width = 1035 Caption = “Save” End Begin VBCE.TextBox txtView Height = 3495 Left = 30 Top = 30 Width = 3555 04 2773 Ch03 10/19/01 12:24 PM Page 40 eMbedded Visual Basic: Windows CE and Pocket PC Mobile Applications 40 LISTING 3.2 Continued Text = “” MultiLine = -1 ‘True ScrollBars = 3 End End FIGURE 3.3 The final Form layouts for PocketExplorer. Getting Directory Contents One primary function of PocketExplorer is to display directory contents, so you need to write a workhorse function that can be called to do so. You want the function to read a directory, and then populate the TreeView with any subfolders in the directory as well as populate the textbox with all the directory files, provided they meet your filter conditions. To make the code a little easier to reuse in other projects, it’s a good idea to make it a function that’s entirely independent of this project. That means you should have no direct references to any of the forms’ controls, so what you need is a function that will take all this information as input parameters. 04 2773 Ch03 10/19/01 12:24 PM Page 41 Manipulating Files 41 CHAPTER 3 Call the ReadDirectory function and put it in the code module modMain. Public Sub ReadDirectory(Path As String, _ fsFileSystem As FILECTLCtl.FileSystem, _ tvwTreeView As MSCETREEVIEWLibCtl.TreeViewCtl, _ nodParentNode As MSCETREEVIEWLibCtl.Node, _ lstListBox As ListBox, _ strFilter As String) When giving the parameter types, it’s important to provide the libraries they come from (that is, FILECTLClt.FileSystem instead of just FileSystem) because without them, you won’t get IntelliSense for the object inside the function.
Recommended publications
  • Remote Wireless Control of Building Management Systems Automation
    Master Thesis Computer Science Thesis no: MCS-2004:23 Remote wireless control of building management systems automation Marcus Gylling Blekinge Institute of Technology Department of Software Engineering and Computer Science Examinator: Rune Gustavsson, Blekinge Institute of Technology Blekinge Institute of Technology Department of Software Engineering and Computer Science Preface This thesis is submitted to the Department of Software Engineering and Computer Science at Blekinge Institute of Technology in partial fulfilment of the requirements for the degree of Master of Science in Computer Science. The thesis is equivalent to 20 weeks of full time studies. The thesis is done in cooperation with Styrprojektering AB. Initiator to the project is Jan-Åke Gylling at Styrprojektering AB. The target group for this thesis is companies that creates installations in the building systems automation business, the users that controls those installations and also the house-owners of the buildings where the installations are made. Contact information Author: Marcus Gylling Email: [email protected] External advisor: Jan-Åke Gylling Styrprojektering AB University advisor: Rune Gustravsson II Remote wireless control of building management systems automation Blekinge Institute of Technology Department of Software Engineering and Computer Science Abstract The controlling unit in building management system automation is a PLC. Every device in an installation is connected to the PLC. When a user wants to interact with a system an operator terminal, which is attached to a cabinet where the PLC is installed, is used. With this solution the user needs to be in front of the cabinet to interact with the system. Alarms do not get the user’s attention until the user checks the operator terminal.
    [Show full text]
  • Developing Applications for Pocket PC and GPRS/EDGE Devcentral White Paper
    Developing Applications for Pocket PC and GPRS/EDGE devCentral White Paper Document Number 12588 Revision 2.0 Revision Date 10/15/03 AT&T Wireless Developer Program © 2003 AT&T Wireless. All rights reserved. Legal Disclaimer This document and the information contained herein (collectively, the "Information") is provided to you (both the individual receiving this document and any legal entity on behalf of which such individual is acting) ("You" and "Your") by AT&T Wireless Services, Inc. ("AWS") for informational purposes only. AWS is providing the Information to You because AWS believes the Information may be useful to You. The Information is provided to You solely on the basis that You will be responsible for making Your own assessments of the Information and are advised to verify all representations, statements and information before using or relying upon any of the Information. Although AWS has exercised reasonable care in providing the Information to You, AWS does not warrant the accuracy of the Information and is not responsible for any damages arising from Your use of or reliance upon the Information. You further understand and agree that AWS in no way represents, and You in no way rely on a belief, that AWS is providing the Information in accordance with any standard or service (routine, customary or otherwise) related to the consulting, services, hardware or software industries. AWS DOES NOT WARRANT THAT THE INFORMATION IS ERROR-FREE. AWS IS PROVIDING THE INFORMATION TO YOU "AS IS" AND "WITH ALL FAULTS." AWS DOES NOT WARRANT,
    [Show full text]
  • SQL Server CE Database Development with the .NET Compact Framework Copyright ©2003 by Rob Tiffany Originally Published by Apress in 2003
    SQL Server CE Database Development- with the .NET Compact Framework ROB TIFFANY APress Media, LLC SQL Server CE Database Development with the .NET Compact Framework Copyright ©2003 by Rob Tiffany Originally published by Apress in 2003 All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN 978-1-59059-119-2 ISBN 978-1-4302-0785-6 (eBook) DOI 10.1007/978-1-4302-0785-6 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Technical Reviewer: Darren Flatt Editorial Board: Dan Appleman, Craig Berry, Gary Cornell, Tony Davis, Steven Rycroft, Julian Skinner, Martin Streicher, Jim Sumser, Karen Watterson, Gavin Wray, John Zukowski Assistant Publisher: Grace Wong Project Manager: Nate McFadden Copy Editor: Ami Knox Production Manager: Kari Brooks Production Editor: Lori Bring Proofreader: Lori Bring Compositor: Argosy Publishing Indexer: Ron Strauss Cover Designer: Kurt Krames Manufacturing Manager: Tom Debolski The information in this book is distributed on an "as is" basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work.
    [Show full text]
  • Websphere and .Net Interoperability Using Web Services
    Front cover WebSphere and .Net Interoperability Using Web Services Examples and guidance for building interoperable Web services Roadmap to Web services specifications Using Service-Oriented patterns Peter Swithinbank Francesca Gigante Hedley Proctor Mahendra Rathore William Widjaja ibm.com/redbooks International Technical Support Organization WebSphere and .Net Interoperability Using Web Services June 2005 SG24-6395-00 Note: Before using this information and the product it supports, read the information in “Notices” on page ix. First Edition (June 2005) This edition applies to WebSphere Studio Application Developer V5.1.2 running on Microsoft Windows XP Pro, WebSphere Application Server V5.1.1 with DB/2 8.1 running on Microsoft Server 2003, Microsoft.Net Framework 1.1, and Microsoft IIS V6.0 running on Microsoft Server 2003. © Copyright International Business Machines Corporation 2005. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . ix Trademarks . x Preface . xi The team that wrote this redbook. xiii Become a published author . xv Comments welcome. xv Chapter 1. Introduction. 1 1.1 Background of this book . 2 1.1.1 The scenario . 2 1.1.2 Use of Web services . 3 1.1.3 Other approaches to interoperability . 3 1.1.4 WS-I . 4 1.1.5 Audience . 5 1.1.6 Terminology . 6 Part 1. Introduction to Web services. 9 Chapter 2. SOAP primer . 11 2.1 What is SOAP? . 12 2.2 SOAP components . 12 2.3 What is in a SOAP message? . 14 2.3.1 Headers.
    [Show full text]
  • Getting Started with .NET, .NET CF, Visual Studio .NET
    Getting Started with .NET, .NET CF, Visual Studio .NET Overview of the .NET Framework ................................................................................. 1 Microsoft and Sun's Confrontation ............................................................................................ 5 Getting Started with Visual Studio .NET and the Microsoft .NET Compact Framework ........................................................................................................................... 19 Getting Started with XML Web Services in Visual Basic.NET and Visual C# .................................................................................................................................................. 44 Overview of the .NET Framework [http://msdn.microsoft.com/library/default.asp?url=/library/en- us/cpguide/html/cpovrintroductiontonetframeworksdk.asp] The .NET Framework is an integral Windows component that supports building and running the next generation of applications and XML Web services. The .NET Framework is designed to fulfill the following objectives: • To provide a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely. • To provide a code-execution environment that minimizes software deployment and versioning conflicts. • To provide a code-execution environment that guarantees safe execution of code, including code created by an unknown or semi-trusted third party. • To provide a code-execution environment
    [Show full text]
  • Programming the World in a Browser Real Men Don't Do Javascript Do
    JOURNAL OF OBJECT TECHNOLOGY Online at http://www.jot.fm. Published by ETH Zurich, Chair of Software Engineering ©JOT, 2007 Vol. 6, No. 10, November-December 2007 Programming the World in a Browser Real Men Don’t Do JavaScript Do They?! By Dave Thomas 1 AND THE WINNER IS JAVASCRIPT The mainstream professional developer community has never taken JavaScript seriously but soon they will have no choice. JavaScript is ready to move to center stage as the development and delivery technology for Web 2.x applications. In the past, most enterprise and product developers flocked to Java or C# while web developers moved to PHP, Perl, Python and more recently Ruby, with most ignoring the web based scripting language called JavaScript. At best it has been considered something to spiff up one’s HTML pages. To make matters worse, incompatible implementations of JS and the DOM have tormented developers and made JS very unpopular with many. Until Ajax and Web 2.0 Douglas Crockford seemed to be the only advocate for JavaScript as a reasonable programming language. He pointed out that JS was really a Scheme like language with a prototype-based object model layered on top of it. I’m sure that popular author David Flanagan never dreamed that he would be best known for his book Definitive JavaScript. While many smaller companies had built quality widgets and applications in JS it is was the entry of Yahoo Widgets, and more importantly the that of Google Mail, Calendar, etc. that laid the commercial foundation for the Ajax revolution with a plethora of frameworks and tools.
    [Show full text]
  • Teaching Engineering Analysis Using Vba for Excel
    TEACHING ENGINEERING ANALYSIS USING VBA FOR EXCEL Terrence L. Chambers Department of Mechanical Engineering University of Louisiana at Lafayette PO Box 44170 Lafayette, LA 70504-4170 Abstract This paper will describe an Engineering Analysis course taught at the University of When teaching computer programming to Louisiana at Lafayette that teaches numerical engineering students there is always some methods that are useful to engineers in amount of controversy regarding the language conjunction with the VBA for Excel which should be taught. Traditional choices programming language. First, the reasons for were Fortran or C, but more modern choices are choosing VBA for Excel will be explored. C++, Java, and Visual Basic. This paper Then, the structure of the class will be describes an Engineering Analysis class that is described, with particular attention to the order taught primarily using Visual Basic for in which the topics are presented, so that the Applications (VBA) for Excel. The paper students progress at an equal rate in both topics, outlines the reasons for choosing that language, numerical methods and computer programming. illustrates how the course is organized, and A simple VBA for Excel Program is provided to describes how well the course has worked in illustrate the use of that language. practice. Certain topics of interest with regard to VBA for Excel are explored, and sample Reasons for Choosing VBA for Excel programs are included. The major alternative languages that might Introduction have been chosen for use with this class were C++ and Java, but a great deal of legacy In many engineering programs a course exists engineering code is written in Fortran and C, so to teach computer programming to the there would be some justification for using one engineering student.
    [Show full text]
  • Introduction .NET Microsoft Mobility
    IntroductionIntroduction .NET.NET MicrosoftMicrosoft MobilityMobility MSMS EmbeddedEmbedded PlatformsPlatforms Core WinCE WinCE.NET 3.0 4.X Handheld Pocket Pocket Smartphone WinCE.NET Pocket PC 2000 PC2000 PC 2002 2002 4.2 PC 2003 PA960 PA950 DeveloperDeveloper ToolsTools eMbedded Visual Tools Visual Studio .NET eVC++ 3.0 eVB 3.0 eVC++ 4.0 .NET CF ASP.NET Pocket PC 2000 P l Pocket PC 2002 a Handheld PC t f SP 2002 o Pocket PC 2003 r m WinCE.NET Non-Microsoft eMbedded eMbedded Visual Tools 3.0 Standalone IDE for developmentVisual of applications for ToolsWinCE3.0, built with Platform Builder 3.0 Visual Tools Use to create native applications where direct access to operating system APIs required Processor intensive Device drivers Code that runs natively on the device More like VBScript than Visual Basic 6.0 Only data type is Code is interpreted at runtime Performance not as good as native applications (eMbedded Visual C++) or managed applicationsVariant (.NET Compact Framework) eMbeddedCannot Visual create Basic COM is not objects recommended for future development MS; ”.NET Compact Framework is recommended for most new development” eMbeddedeMbedded VisualVisual C++C++ 4.04.0 New version of eMbedded Visual C++ Visual C++ 4.0 Use to build applications for Windows CE .NET Identical in appearance to eVC++ V3.0 SDK allows access to new features in Windows CE .NET Can be installed alongside eMbedded Visual C++ 3.0 Free download from http://msdn.microsoft.com/vstudio/device/embedded/download.asp VisualVisual StudioStudio .NET.NET
    [Show full text]
  • The Interbase and Firebird Developer Magazine, Issue 4
    2006 ISSUE 4 Contents THE INTERBASE Contents & FIREBIRD DEVELOPER Editor notes by Alexey Kovyazin MAGAZINE Money for nothing ................................................................. 4 Oldest Active by Helen Borrie RTFM — regarding those free manuals ........................................... 5 Credits Community by Carlos Cantu Alexey Kovyazin, About Dolphins and Birds ......................................................... 6 Chief Editor Dmitri Kuzmenko, Cover Story by Paul Ruizendaal Editor The story of Fyracle ................................................................ 8 Helen Borrie, Development area Editor by Paul Ruizendaal Lev Tashchilin, Common Table Expression in Fyracle ............................................ 12 Designer Products Overview Editorial Office IBSurgeon Products .............................................................. 17 IBase IBDeveloper, office 5, Development area 1-st Novokuznetsky lane, 10 by Paul Ruizendaal zip: 115184 Morfik's WebOS: Innovating beyond LAMP ..................................... 18 Moscow, Russia by Vlad Horsun Phone: +7495 6869763 Global Temporary Tables in Fyracle .............................................. 23 Fax: +7495 9531334 TestBed Email: by Alexey Kovyazin [email protected] TPC-C based tests results ........................................................ 26 www.ibdeveloper.com Bonus by Alexey Kovyazin Copyright 2005-2006 by ........................................ 35 IB© Developer. All rights reserved. Comprehensive Repairing Guide. Part 1 No part
    [Show full text]
  • Instituto Tecnológico Superior Cordillera
    INSTITUTO TECNOLÓGICO SUPERIOR CORDILLERA ESCUELA DE SISTEMAS Proyecto de Grado, previa obtención del título de: Tecnólogo Analista de Sistemas TEMA: DESARROLLO E IMPLEMENTACIÓN DEL SISTEMA INTEGRADO PARA EL CONTROL DE PROYECTOS DE GRADO DEL ITSCO AUTOR: Diego Jonathan Torres Gonzales TUTOR: ING. Jaime Basantes 2011 QUITO-ECUADOR ii INSTITUTO TECNOLÓGICO SUPERIOR CORDILLERA DECLARACIÓN DE AUTENTICIDAD Los abajo firmantes, declaramos que los contenidos y los resultados obtenidos en el presente proyecto, como requerimiento previo para la obtención del Título de Tecnólogo Analista de Sistemas, son absolutamente originales, auténticos y personales y de exclusiva responsabilidad legal y académica de los autores. Diego Torres Ing. Jaime Basantes 2 INSTITUTO TECNOLÓGICO SUPERIOR CORDILLERA APROBACIÓN DEL TUTOR En mi calidad de Tutor del trabajo sobre el tema: “DESARROLLO E IMPLEMENTACION DEL SISTEMA INETGRADO PARA EL CONTROL DE PROYECTOS DE GRADO DEL INSTITUTO TECNOLOGICO SUPERIOR CORIDLLERA”, presentado por el ciudadano DIEGO JONATHAN TORRES GONZALES, estudiante de la Escuela de Sistemas, considero que dicho informe reúne los requisitos y méritos suficientes para ser sometido a la evaluación por parte del Tribunal de Grado, que el Honorable Consejo de Escuela designe, para su correspondiente estudio y calificación. Quito, Octubre de 2011 Ing. Jaime Basantes TUTOR 3 INSTITUTO TECNOLÓGICO SUPERIOR CORDILLERA APROBACIÓN DEL TRIBUNAL DE GRADO Los miembros del Tribunal de Grado designado por el Honorable Concejo de la Escuela de Sistemas, aprueban el trabajo de investigación de acuerdo con las disposiciones reglamentarias emitidas por el Centro de Investigaciones Tecnológicas y Proyectos del Instituto Tecnológico Superior Cordillera” para proyectos de grado de Tecnólogos Analistas de Sistemas: del Sr: DIEGO JONATHAN TORRES GONZALES.
    [Show full text]
  • 3 Programmieren Mit Vbscript
    3 Programmieren mit VBScript Windows Scripting lernen ISBN 3-8273-2019-4 In diesem Kapitel werden die Grundlagen für das Programmieren mit Lernziel VBScript vermittelt. Dazu gehören die grundlegenden Regeln, die beim Erstellen von VBScript-Code notwendig sind, sowie das Arbeiten mit Konstanten und Variablen. Anschließend wird die Verwendung von Be- dingungen und Schleifen besprochen, mit denen der Ablauf des Skripts gesteuert werden kann. Weiterhin geht es um eingebaute Funktionen und selbst definierte Unterroutinen. Am Ende wird das Rüstzeug für den Umgang mit Laufzeitfehlern vermittelt. Ein großes Gebiet der VBScript-Programmierung ist die Arbeit mit Objekten. Dieses wichtige Thema ist in Kapitel 4 ausgelagert. 3.1 Die Visual Basic-Sprachfamilie Die Sprache BASIC (Beginners All Purpose Symbolic Instruction Code) hat bei Microsoft eine lange Geschichte, zunächst als QBasic, später als Visual Basic. Innerhalb der Microsoft Windows-Welt ist Visual Basic die beliebteste Programmiersprache. Visual Basic gibt es in vier Dialekten: • Das eigentliche Visual Basic zur Entwicklung eigenständiger Anwen- dungen, • Embedded Visual Basic zur Entwicklung für Windows CE (dem Handheld-Betriebssystem von Microsoft), • Visual Basic for Applications (VBA) als Makrosprache in Microsoft Office und anderen Endbenutzer-Anwendungen • und Visual Basic Script (VBS) für den Windows Script Host (WSH) und andere Skript-Umgebungen in Windows-Anwendungen. Die Visual Basic-Sprachfamilie 41 VBA und VBScript haben ähnliche Anwendungsgebiete. Der Hauptun- terschied liegt darin, dass VBScript kostenlos ist, während Microsoft für die Verbreitung von Anwendungen mit integriertem VBA kräftig Lizenzgebühren kassiert. VBA ist außerdem nicht nur eine Sprache, sondern umfasst auch eine komfortable Entwicklungsumgebung, wo- rin der Hauptgrund für den hohen Preis zu suchen ist.
    [Show full text]
  • Programming the Pocket PC OS for Embedded IR Applications
    AN926 Programming the Pocket PC OS for Embedded IR Applications Appendix A: “Example Irda Standard System Author: Joseph Snyder, Microchip Technology Inc. Description” describes the system and documents the Frank Ableson, Unwired Tools, LLC tool used to create this Pocket PC application program, while Appendix B: “PPC Source Code - IrDA INTRODUCTION DEMO.CPP” through Appendix C: “PPC Source Code - IrDA DemoDlg.cpp” is the PPC Application This application note details the tools, supporting Program source code. technologies and procedures for the development of infrared applications on Windows Mobile™ based Figure 1 shows an IrDA standard system, where a devices. Pocket PC PDA device is communicating with an embedded system. In this system, the Pocket PC A Pocket PC (PPC) application that interfaces with an (PPC) PDA operates as the Primary Device (Client) embedded system via IrCOMM is included in the and the embedded system operates as the Secondary Appendices of this application note. This source code Device (Server). The terms Client and Server are used ® demonstrates the use of the Windows Application in reference to Windows (PC and PPC) programming, ® Programming Interface (API) required for IrDA while Primary Device and Secondary Device are terms standard IR communication on Windows Mobile based used by the IrDA Standard. platforms. FIGURE 1: POCKET PC PDA - EMBEDDED SYSTEM BLOCK DIAGRAM Embedded System with IrDA® Port (Secondary Device/Server) Host Controller MCP215X Optical and Embedded or Transceiver Circuitry MCP2140 Circuitry Pocket PC Handheld Device with IrDA® Standard Port (Primary Device/Client) © 2007 Microchip Technology Inc. DS00926A-page 1 AN926 Terminology • Primary Device: The IrDA standard device that queries for other devices.
    [Show full text]