Lab 6: Making a program persistent

Size: px
Start display at page:

Download "Lab 6: Making a program persistent"

Transcription

1 Lab 6: Making a program persistent In this lab, you will cover the following topics: Using the windows registry to make parts of the user interface sticky Using serialization to save application data in an binary format Automating the load and save process so that the program will always resume from where it left off In this lab, you will complete the Investments application developed over the previous labs, adding persistence mechanisms that will save user-interface and application data. 1. Returning to the Investments application/project We will extend the InvestmentUI application started in lab 4 and extended in lab 5. To re-open this application, EITHER: Run Visual Studio.NET and from the start page click on the Entry for InvestmentUI in the existing applications list OR: Run Visual Studio.NET and from the File menu select File Open Project, locate the Solution (.sln) file for your project and open this If you did not complete lab5, or would prefer to start with a fresh version of it, download the InvestmentUI.zip file from the Labs section of the website and extract the project folder to the folder where you keep your VB.NET projects. Then proceed as above. The project should open as the complete solution to lab Saving UI Information to the Windows Registry (optional) Note that program access to the computer registry is not always possible (e.g. if you are working in a lab where restrictions are in place to prevent malicious damage to a computer). Therefore, you may not be able to make this facility work properly. However, the exception handling used will inform you if such restrictions are in place and the program would work on a home PC if you subsequently transport it. We will save a few pieces of information to the registry and could save many more, but you should accept the limitation that only a small amount of data should ever be sent to this location in the interest of saving the host computer from becoming gummed up with a lot of inappropriate data. The information save will be: 1. The location of the main program window on the PC screen 2. The time and date the application was last used Writing data to the registry is done by using the SaveSetting() sub, which is used as follows: A.McMonnies, CIS Lab 6, Page 1 02/02/2004

2 SaveSetting(<ProgramName>, <SectionName>, <SettingName>, <SettingValue>) All of the parameters to this sub are required to be strings. The first three parameters will always be string (since they are names), but the fourth could be anything a number, date, time or Boolean. Therefore, we may need to translate any value sent to the registry to a String, usually by using the ToString() method of an existing data type. The code to send our selected values to the registry should be in a routine that will execute just before the application shuts down the Form.Closing() event handler for the main form (frminvestments) is ideal for this. Double-click on the background of the main application form to generate the outline for the Form_Load event handler. Leave this as it is for now we will add code to it in the next section. From the Method Name box at the top-right of the code window, pull down the list of event handler names and select the Closing() event (they are organised into alphabetical order. This will cause the outline for the frminvestments.closing() method to be created in the code window. Now add the four statements shown below to this event handler (note they have been formatted here to fit on the page each statement can instead be placed on a single line by just missing out the _ line continuation sequences: Private Sub frminvestments_closing(byval sender As Object, _ ByVal e As System.ComponentModel.CancelEventArgs) _ Handles MyBase.Closing Try SaveSetting(Application.ProductName, "FormPosition", _ "Left", Me.Left.ToString()) SaveSetting(Application.ProductName, "FormPosition", _ "Top", Me.Top.ToString()) SaveSetting(Application.ProductName, "LastUsed", _ "Date", DateString) SaveSetting(Application.ProductName, "LastUsed", _ "Time", TimeString) Catch ex As Exception MessageBox.Show( "Unable to save application settings. ", _ "InvestmentUI", MessageBoxButtons.OK, _ MessageBoxIcon.Exclamation) End Try This code will save the application settings to the registry. Note that if registry access has been denied, the exception handler will display a message to indicate that this has happened. Note also that numerical values (Me.Top and Me.Left) have been converted to strings using the ToString() method. The date and time values were retrieved from the operating system as strings (DateString, TimeString) so the conversion was not necessary. A.McMonnies, CIS Lab 6, Page 2 02/02/2004

3 3. Loading UI Information from the Windows Registry (optional) Retrieving information from the registry is a simple reversal of the above process. However, a little more care is required because the information to be loaded may not be in the registry (e.g. if the application has never been run before), and because the information retrieved will always be in String format and may need to be converted. To retrieve the data that is stored in the registry by the code in the previous step, proceed as follows: Go back to the frminvestments.load() method that an outline was created for in the previous step. Add the following statements: Private Sub frminvestments_load(byval sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load Dim LastUsedDate As String Dim LastUsedTime As String Me.Left = CInt(GetSetting(Application.ProductName, _ "FormPosition", "Left", "100")) Me.Top = CInt(GetSetting(Application.ProductName, _ "FormPosition", "Top", "100")) LastUsedDate = GetSetting(Application.ProductName, _ "LastUsed", "Date", "Never") LastUsedTime = GetSetting(Application.ProductName, _ "LastUsed", "Time", "") MessageBox.Show(String.Format( _ "Program was last used on {0} at {1}", _ LastUsedDate, LastUsedTime)) Test the application s persistence. You should now find that if you run the program and movie its main form to a different position and shut it down, the next time you run it, it will display a message indicating the time and date of the last shut-down, and position the form exactly where it was at that time. 4. Adding the <Serialization()> attribute and serializing the data To save the object-model data, we need to mark the Investment class as serializable using a code attribute. Code attributes in.net are markers applied to a section of code (a Class, Sub, Function or Property) that tell the.net runtime more about it. They act as settings that describe the code in some way, and a number of standard attributes are already supported in.net code. More can be added, nut that is a matter beyond the purpose of this lab. Marking a class as Serializable() makes it possible for the.net runtime to send it to a stream (either a binary stream or a XML stream) for persistence or communications purposes. In the Solution Explorer, double-click on the Investment.vb class file. The file will open in a code window (if it is not already open). Modify the first line in the module (which is currently Public Class Investment) by adding the word Serializable in angle brackets as shown: <Serializable()> Public Class Investment Private Capital As Decimal Private PIR As Single A.McMonnies, CIS Lab 6, Page 3 02/02/2004

4 ...code continues... This small modification will enable.net to save objects of the Investment class to a stream. We can now add code to the application s main form to send the entire collection of Investment objects to a stream as follows: Return to the main form s code window (frminvestments) and add the following two code routines to the form class: Private Sub SerializeData() Dim filename As String ' First, set up a suitable file name in the application's folder... filename = Application.ExecutablePath ' filename currently has the application name at the end remove ' it and add a more suitable one... filename = filename.substring(0, filename.lastindexof("\")) & _ "\Investments.dat" ' A listbox is not serializable, so extract the list of Investments ' from it and put them into an ArrayList... Dim al As New ArrayList al.addrange(lstinvestments.items) ' Now create a serialization formatter... Dim str As New IO.FileStream(fileName, IO.FileMode.Create) Dim b As New _ Runtime.Serialization.Formatters.Binary.BinaryFormatter b.serialize(str, al) str.close() Private Sub DeSerializeData() Dim filename As String filename = Application.ExecutablePath filename = filename.substring(0, filename.lastindexof("\")) & _ "\Investments.dat" ' Now try to get the serialized data from the file... Dim str As New IO.FileStream(fileName, IO.FileMode.Open) Dim b As New _ Runtime.Serialization.Formatters.Binary.BinaryFormatter ' need to read it into an ArrayList (that was what we saved)... Dim al As New ArrayList al = CType(b.Deserialize(str), ArrayList) str.close() lstinvestments.items.addrange(al.toarray()) Note that serialization and de-serialization are handled by new objects a FileStream object is used to send the data to and retrieve the data from a file. A BinaryFormatter object is used to handle the conversion from object model (the items in a listbox) to a binary stream and back. When we send the items to the stream, the BinaryFormatter is aware of the type the list of items must be converted to (a stream of binary data). However, in the reverse direction, the binary that is retrieved will be simply regarded as some type of object (there is no ArrayListFormatter to format it automatically into an ArrayList), so we must make a type conversion (or a cast) to return the data into an ArrayList; the CType() function does this. A.McMonnies, CIS Lab 6, Page 4 02/02/2004

5 Note also that because the.net runtime system does not know how to send the contents of a ListBox to a stream, when we save the data we first move it into an ArrayList (using al.addrange()) and when we retrieve it, we read into an ArrayList and then add it to the ListBox (using lstinhvestments.items.addrange()). 5. Automating the Save and Load processes The two routines described in section 4 will handle the saving and retrieving of the object model data to and from a binary stream. The final step is to make sure that they are executed when the application is used serialize the data when the program is shut down, and retrieve it when it is started up. Add a call to DeSerializeData() at the end of the frminvestment.load() method to ensure that the data is retrieved when the application is started up. Note that it is possible that the data file does not exist, since this may be the first time the application has been run. Therefore, you will need to guard against an attempt to open a non-existent data file. The easiest solution will be to insert the call to DeSerializeData() into the Try block of a Try..Catch..End Try exception handler, displaying a suitable message in a message box if an exception occurs. Add a call to SerializeData( ) at the end of the frminvestment.close() method to ensure that the data is saved at the same time as the form settings. It is a parameterless Sub, so simply add the name to the end of the.close() method. There will be no need to guard against problems here the program will always be able to create a new data file. Having completed this lab, you should be able to Make use of the registry read and write methods ( GetSetting() and SaveSetting() ) to store small amounts of application data to the Windows Registry Handle the conversions between application data and Strings, which are the required data format for the registry Make a class serializable by adding the <Serializable()> attribute Send object model data to and retrieve it from a binary stream. A.McMonnies, CIS Lab 6, Page 5 02/02/2004

Lab 4: Adding a Windows User-Interface

Lab 4: Adding a Windows User-Interface Lab 4: Adding a Windows User-Interface In this lab, you will cover the following topics: Creating a Form for use with Investment objects Writing event-handler code to interact with Investment objects Using

More information

11. Persistence. The use of files, streams and serialization for storing object model data

11. Persistence. The use of files, streams and serialization for storing object model data 11. Persistence The use of files, streams and serialization for storing object model data Storing Application Data Without some way of storing data off-line computers would be virtually unusable imagine

More information

Unit Title: Files, Streams and Serialization. Software Development Unit 9. Files, Streams and Serialization

Unit Title: Files, Streams and Serialization. Software Development Unit 9. Files, Streams and Serialization Software Development Unit 9 Files, Streams and Serialization Aims Most computer systems rely on the long-term storage of data to make them workable. In this Unit, we look at a number of mechanisms provided

More information

Lab Sheet 4.doc. Visual Basic. Lab Sheet 4: Non Object-Oriented Programming Practice

Lab Sheet 4.doc. Visual Basic. Lab Sheet 4: Non Object-Oriented Programming Practice Visual Basic Lab Sheet 4: Non Object-Oriented Programming Practice This lab sheet builds on the basic programming you have done so far, bringing elements of file handling, data structuring and information

More information

Learning VB.Net. Tutorial 19 Classes and Inheritance

Learning VB.Net. Tutorial 19 Classes and Inheritance Learning VB.Net Tutorial 19 Classes and Inheritance Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you

More information

CS708 Lecture Notes. Visual Basic.NET Object-Oriented Programming. Implementing Client/Server Architectures. Part (I of?) (Lecture Notes 5A)

CS708 Lecture Notes. Visual Basic.NET Object-Oriented Programming. Implementing Client/Server Architectures. Part (I of?) (Lecture Notes 5A) CS708 Lecture Notes Visual Basic.NET Object-Oriented Programming Implementing Client/Server Architectures Part (I of?) (Lecture Notes 5A) Professor: A. Rodriguez CHAPTER 1 IMPLEMENTING CLIENT/SERVER APPLICATIONS...

More information

Lab 3 The High-Low Game

Lab 3 The High-Low Game Lab 3 The High-Low Game LAB GOALS To develop a simple windows-based game named High-Low using VB.Net. You will use: Buttons, Textboxes, Labels, Dim, integer, arithmetic operations, conditionals [if-then-else],

More information

The New Brew-CQ Synchronous Sockets and Threading

The New Brew-CQ Synchronous Sockets and Threading The New Brew-CQ Synchronous Sockets and Threading Server Topology: The Brew-CQ server is an application written in the new.net compilers from Microsoft. The language of choice is Visual Basic. The purpose

More information

IMS1906: Business Software Fundamentals Tutorial exercises Week 5: Variables and Constants

IMS1906: Business Software Fundamentals Tutorial exercises Week 5: Variables and Constants IMS1906: Business Software Fundamentals Tutorial exercises Week 5: Variables and Constants These notes are available on the IMS1906 Web site http://www.sims.monash.edu.au Tutorial Sheet 4/Week 5 Please

More information

VISUAL BASIC PROGRAMMING (44) Technical Task KEY. Regional 2013 TOTAL POINTS (485)

VISUAL BASIC PROGRAMMING (44) Technical Task KEY. Regional 2013 TOTAL POINTS (485) 5 Pages VISUAL BASIC PROGRAMMING (44) Technical Task KEY Regional 2013 TOTAL POINTS (485) Graders: Please double-check and verify all scores! Property of Business Professionals of America. May be reproduced

More information

How to Validate DataGridView Input

How to Validate DataGridView Input How to Validate DataGridView Input This example explains how to use DR.net to set validation criteria for a DataGridView control on a Visual Studio.NET form. Why You Should Use This To add extensible and

More information

Connection Example. Document ID : Connection_Example.PDF Author : Michele Harris Version : 1.1 Date :

Connection Example. Document ID : Connection_Example.PDF Author : Michele Harris Version : 1.1 Date : Connection Example Document ID : Connection_Example.PDF Author : Michele Harris Version : 1.1 Date : 2009-06-19 page 1 Table of Contents Connection Example... 2 Adding the Code... 2 Quick Watch myconnection...

More information

2609 : Introduction to C# Programming with Microsoft.NET

2609 : Introduction to C# Programming with Microsoft.NET 2609 : Introduction to C# Programming with Microsoft.NET Introduction In this five-day instructor-led course, developers learn the fundamental skills that are required to design and develop object-oriented

More information

PROGRAMMING ASSIGNMENT: MOVIE QUIZ

PROGRAMMING ASSIGNMENT: MOVIE QUIZ PROGRAMMING ASSIGNMENT: MOVIE QUIZ For this assignment you will be responsible for creating a Movie Quiz application that tests the user s of movies. Your program will require two arrays: one that stores

More information

IN COLLABORATION WITH IVTB. Diploma in Information Technology. Examinations for / Semester 2

IN COLLABORATION WITH IVTB. Diploma in Information Technology. Examinations for / Semester 2 IN COLLABORATION WITH IVTB Diploma in Information Technology DIP/03/Full Time Examinations for 2004 2005 / Semester 2 MODULE: VISUAL PROGRAMMING MODULE CODE: BISE070 Duration: 2 Hours + 10 Minutes (Reading

More information

Level 3 Computing Year 2 Lecturer: Phil Smith

Level 3 Computing Year 2 Lecturer: Phil Smith Level 3 Computing Year 2 Lecturer: Phil Smith Previously We started to build a GUI program using visual studio 2010 and vb.net. We have a form designed. We have started to write the code to provided the

More information

Objectives. After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism

Objectives. After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism Polymorphism Objectives After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism Definition Polymorphism provides the ability

More information

M Introduction to C# Programming with Microsoft.NET - 5 Day Course

M Introduction to C# Programming with Microsoft.NET - 5 Day Course Module 1: Getting Started This module presents the concepts that are central to the Microsoft.NET Framework and platform, and the Microsoft Visual Studio.NET integrated development environment (IDE); describes

More information

VARIABLES. 1. STRINGS Data with letters and/or characters 2. INTEGERS Numbers without decimals 3. FLOATING POINT NUMBERS Numbers with decimals

VARIABLES. 1. STRINGS Data with letters and/or characters 2. INTEGERS Numbers without decimals 3. FLOATING POINT NUMBERS Numbers with decimals VARIABLES WHAT IS A VARIABLE? A variable is a storage location in the computer s memory, used for holding information while the program is running. The information that is stored in a variable may change,

More information

Learning VB.Net. Tutorial 10 Collections

Learning VB.Net. Tutorial 10 Collections Learning VB.Net Tutorial 10 Collections Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it.

More information

Running the Altair SIMH from.net programs

Running the Altair SIMH from.net programs Running the Altair SIMH from.net programs The Altair SIMH simulator can emulate a wide range of computers and one of its very useful features is that it can emulate a machine running 50 to 100 times faster

More information

CT862 Section 1 Introduction

CT862 Section 1 Introduction CT862 Section 1 Introduction VB.NET: VB introduced in 1991 Provided the first easily accessible means of writing Windows applications o The VB IDE was inherently graphical and mirrored the Windows OS itself

More information

Unit 6 - Software Design and Development LESSON 4 DATA TYPES

Unit 6 - Software Design and Development LESSON 4 DATA TYPES Unit 6 - Software Design and Development LESSON 4 DATA TYPES Previously Paradigms Choice of languages Key features of programming languages sequence; selection eg case, if then else; iteration eg repeat

More information

2. A GUI A. uses buttons, menus, and icons B. should be easy for a user to manipulate C. both (a) and (b) D. stands for Graphic Use Interaction

2. A GUI A. uses buttons, menus, and icons B. should be easy for a user to manipulate C. both (a) and (b) D. stands for Graphic Use Interaction 1. Which language is not a true object-oriented programming language? A. VB 6 B. VB.NET C. JAVA D. C++ 2. A GUI A. uses buttons, menus, and icons B. should be easy for a user to manipulate C. both (a)

More information

BSc (Hons) Computer Science with. Network Security. BSc (Hons) Business Information Systems. Examinations for 2018 / Semester 1

BSc (Hons) Computer Science with. Network Security. BSc (Hons) Business Information Systems. Examinations for 2018 / Semester 1 BSc (Hons) Computer Science with Network Security BSc (Hons) Business Information Systems Cohort: BCNS/17A/FT Examinations for 2018 / Semester 1 Resit Examinations for BIS/16B/FT, BCNS/15A/FT, BCNS/15B/FT,

More information

To get started with Visual Basic 2005, I recommend that you jump right in

To get started with Visual Basic 2005, I recommend that you jump right in In This Chapter Chapter 1 Wading into Visual Basic Seeing where VB fits in with.net Writing your first Visual Basic 2005 program Exploiting the newfound power of VB To get started with Visual Basic 2005,

More information

Section 7 The BASIC Language II

Section 7 The BASIC Language II Dates Section 7 The BASIC Language II The Date class holds a date (between January 1 st, 0001 and December 31 st, 9999) combined with a time (between 0:00:00 and 23:59:59) Constructors of the Date class

More information

Chapter 2 Exploration of a Visual Basic.Net Application

Chapter 2 Exploration of a Visual Basic.Net Application Chapter 2 Exploration of a Visual Basic.Net Application We will discuss in this chapter the structure of a typical Visual Basic.Net application and provide you with a simple project that describes the

More information

Tutorial 03 understanding controls : buttons, text boxes

Tutorial 03 understanding controls : buttons, text boxes Learning VB.Net Tutorial 03 understanding controls : buttons, text boxes Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple

More information

DEVELOPING OBJECT ORIENTED APPLICATIONS

DEVELOPING OBJECT ORIENTED APPLICATIONS DEVELOPING OBJECT ORIENTED APPLICATIONS By now, everybody should be comfortable using form controls, their properties, along with methods and events of the form class. In this unit, we discuss creating

More information

C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions

C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions Between the comments included with the code and the code itself, you shouldn t have any problems understanding what

More information

Visual Studio.NET for AutoCAD Programmers

Visual Studio.NET for AutoCAD Programmers December 2-5, 2003 MGM Grand Hotel Las Vegas Visual Studio.NET for AutoCAD Programmers Speaker Name: Andrew G. Roe, P.E. Class Code: CP32-3 Class Description: In this class, we'll introduce the Visual

More information

FOR 240 Homework Assignment 4 Using DBGridView and Other VB Controls to Manipulate Database Introduction to Computing in Natural Resources

FOR 240 Homework Assignment 4 Using DBGridView and Other VB Controls to Manipulate Database Introduction to Computing in Natural Resources FOR 240 Homework Assignment 4 Using DBGridView and Other VB Controls to Manipulate Database Introduction to Computing in Natural Resources This application demonstrates how a DataGridView control can be

More information

05/31/2009. Data Files

05/31/2009. Data Files Data Files Store and retrieve data in files using streams Save the values from a list box and reload for the next program run Check for the end of file Test whether a file exists Display the standard Open

More information

Revision for Final Examination (Second Semester) Grade 9

Revision for Final Examination (Second Semester) Grade 9 Revision for Final Examination (Second Semester) Grade 9 Name: Date: Part 1: Answer the questions given below based on your knowledge about Visual Basic 2008: Question 1 What is the benefit of using Visual

More information

MapMatrix NetGIS Application Objects Users Guide. Version 2.3

MapMatrix NetGIS Application Objects Users Guide. Version 2.3 MapMatrix NetGIS Application Objects Users Guide Version 2.3 CONTENTS 1 Overview of MapMatrix NetGIS... 3 1.1 MapMatrix NetGIS Features... 3 1.2 Operating System Requirements... 3 1.3 The MapMatrix Architecture...

More information

PASSTCERT QUESTION & ANSWER

PASSTCERT QUESTION & ANSWER PASSTCERT QUESTION & ANSWER Higher Quality Better Service! Weofferfreeupdateserviceforoneyear HTTP://WWW.PASSTCERT.COM Exam : 070-540VB Title : TS: MS.NET Frmewk 3.5, Workflow Foundation App Dev Version

More information

Hands-On Lab. Lab: Client Object Model. Lab version: Last updated: 2/23/2011

Hands-On Lab. Lab: Client Object Model. Lab version: Last updated: 2/23/2011 Hands-On Lab Lab: Client Object Model Lab version: 1.0.0 Last updated: 2/23/2011 CONTENTS OVERVIEW... 3 EXERCISE 1: RETRIEVING LISTS... 4 EXERCISE 2: PRINTING A LIST... 8 EXERCISE 3: USING ADO.NET DATA

More information

COPYRIGHTED MATERIAL. Contents. Part I: C# Fundamentals 1. Chapter 1: The.NET Framework 3. Chapter 2: Getting Started with Visual Studio

COPYRIGHTED MATERIAL. Contents. Part I: C# Fundamentals 1. Chapter 1: The.NET Framework 3. Chapter 2: Getting Started with Visual Studio Introduction XXV Part I: C# Fundamentals 1 Chapter 1: The.NET Framework 3 What s the.net Framework? 3 Common Language Runtime 3.NET Framework Class Library 4 Assemblies and the Microsoft Intermediate Language

More information

Form Adapter Example. DRAFT Document ID : Form_Adapter.PDF Author : Michele Harris Version : 1.1 Date :

Form Adapter Example. DRAFT Document ID : Form_Adapter.PDF Author : Michele Harris Version : 1.1 Date : Form Adapter Example DRAFT Document ID : Form_Adapter.PDF Author : Michele Harris Version : 1.1 Date : 2009-06-19 Form_Adapter.doc DRAFT page 1 Table of Contents Creating Form_Adapter.vb... 2 Adding the

More information

Serial Ports and COM Ports

Serial Ports and COM Ports o serial port on your PC? No problem! To add a serial port, attach a USB/serial adapter to a USB port. This article focuses on the PC side of serial port communications. I ll show how to use Visual Basic.NET

More information

Event-based Programming

Event-based Programming Window-based programming Roger Crawfis Most modern desktop systems are window-based. What location do I use to set this pixel? Non-window based environment Window based environment Window-based GUI s are

More information

Fourth Shift Transactional Interface Fourth Shift Release 7.50

Fourth Shift Transactional Interface Fourth Shift Release 7.50 Fourth Shift Transactional Interface Fourth Shift Release 7.50 Fourth Shift Help 2008, Release 7.50 2008 SoftBrands, Inc. All rights reserved This documentation is copyrighted and all rights are reserved.

More information

Data Structure. Recitation IV

Data Structure. Recitation IV Data Structure Recitation IV Topic Java Generics Java error handling Stack Lab 2 Java Generics The following code snippet without generics requires casting: List list = new ArrayList(); list.add("hello");

More information

DATA MIRROR FOR PT USER S GUIDE. Multiware, Inc. Oct 9, 2012 *Changes are in red font*

DATA MIRROR FOR PT USER S GUIDE. Multiware, Inc. Oct 9, 2012 *Changes are in red font* DATA MIRROR FOR PT USER S GUIDE Multiware, Inc. Oct 9, 2012 *Changes are in red font* Table of Contents 1. Introduction...3 2. Prerequisites...4 3. MirrorControl Class...5 3.1 Methods...5 ClearALLPTData...5

More information

CALIFORNIA STATE UNIVERSITY, SACRAMENTO College of Business Administration. MIS 15 Introduction to Business Programming. Programming Assignment 3 (P3)

CALIFORNIA STATE UNIVERSITY, SACRAMENTO College of Business Administration. MIS 15 Introduction to Business Programming. Programming Assignment 3 (P3) CALIFORNIA STATE UNIVERSITY, SACRAMENTO College of Business Administration MIS 15 Introduction to Business Programming Programming Assignment 3 (P3) Points: 50 Due Date: Tuesday, May 10 The purpose of

More information

ADO.NET 2.0. database programming with

ADO.NET 2.0. database programming with TRAINING & REFERENCE murach s ADO.NET 2.0 database programming with (Chapter 3) VB 2005 Thanks for downloading this chapter from Murach s ADO.NET 2.0 Database Programming with VB 2005. We hope it will

More information

VB FUNCTIONS AND OPERATORS

VB FUNCTIONS AND OPERATORS VB FUNCTIONS AND OPERATORS In der to compute inputs from users and generate results, we need to use various mathematical operats. In Visual Basic, other than the addition (+) and subtraction (-), the symbols

More information

Design Of Human Computer Interfaces Assignment 1- Hello World. Compliance Report

Design Of Human Computer Interfaces Assignment 1- Hello World. Compliance Report Design Of Human Computer Interfaces Assignment 1- Hello World Compliance Report Prepared for: Skip Poehlman Prepared By: K C Course: SE 4D03 Date: September 30, 2008 Contents 1. Code Listing a. Module

More information

Developing an app using Web Services, DB2, and.net

Developing an app using Web Services, DB2, and.net Developing an app using Web Services, DB2, and.net http://www7b.software.ibm.com/dmdd/ Table of contents If you're viewing this document online, you can click any of the topics below to link directly to

More information

SmartBox System Manager 3.0 Installation Guide

SmartBox System Manager 3.0 Installation Guide SmartBox System Manager 3.0 Installation Guide Requirements The SmartBox System Manager 3.0 requires the.net Framework 4.0 to be installed for the application to run. The.NET Framework 4.0 and the SmartBox

More information

To enter the number in decimals Label 1 To show total. Text:...

To enter the number in decimals Label 1 To show total. Text:... Visual Basic tutorial - currency converter We will use visual studio to create a currency converter where we can convert a UK currency pound to other currencies. This is the interface for the application.

More information

Learning VB.Net. Tutorial 17 Classes

Learning VB.Net. Tutorial 17 Classes Learning VB.Net Tutorial 17 Classes Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it. If

More information

DRAWING AND MOVING IMAGES

DRAWING AND MOVING IMAGES DRAWING AND MOVING IMAGES Moving images and shapes in a Visual Basic application simply requires the user of a Timer that changes the x- and y-positions every time the Timer ticks. In our first example,

More information

Cowley College & Area Vocational Technical School

Cowley College & Area Vocational Technical School Cowley College & Area Vocational Technical School COURSE PROCEDURE FOR C++ PROGRAMMING CIS1862 3 Credit Hours Student Level: This course is open to students on the college level in either freshman or sophomore

More information

Visual Basic 2008 Anne Boehm

Visual Basic 2008 Anne Boehm TRAINING & REFERENCE murach s Visual Basic 2008 Anne Boehm (Chapter 3) Thanks for downloading this chapter from Murach s Visual Basic 2008. We hope it will show you how easy it is to learn from any Murach

More information

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

Developing Microsoft.NET Applications for Windows (Visual Basic.NET) Developing Microsoft.NET Applications for Windows (Visual Basic.NET) Course Number: 2555 Length: 1 Day(s) Certification Exam This course will help you prepare for the following Microsoft Certified Professional

More information

Instructions for writing Web Services using Microsoft.NET:

Instructions for writing Web Services using Microsoft.NET: Instructions for writing Web Services using Microsoft.NET: Pre-requisites: Operating System: Microsoft Windows XP Professional / Microsoft Windows 2000 Professional / Microsoft Windows 2003 Server.NET

More information

C16 Visual Basic Net Programming

C16 Visual Basic Net Programming C16 Visual Basic Net Programming Student ID Student Name Date - Module Tutor - 1 P a g e Report Contents Introduction... 2 Software Development Process... 3 Self Reflection... 6 References... 6 Appendices...

More information

Introduction. In this preliminary chapter, we introduce a couple of topics we ll be using DEVELOPING CLASSES

Introduction. In this preliminary chapter, we introduce a couple of topics we ll be using DEVELOPING CLASSES Introduction In this preliminary chapter, we introduce a couple of topics we ll be using throughout the book. First, we discuss how to use classes and object-oriented programming (OOP) to aid in the development

More information

COPYRIGHTED MATERIAL. Taking Web Services for a Test Drive. Chapter 1. What s a Web Service?

COPYRIGHTED MATERIAL. Taking Web Services for a Test Drive. Chapter 1. What s a Web Service? Chapter 1 Taking Web Services for a Test Drive What s a Web Service? Understanding Operations That Are Well Suited for Web Services Retrieving Weather Information Using a Web Service 101 Retrieving Stock

More information

โปรแกรมช วยทดสอบหม อแปลงกระแส

โปรแกรมช วยทดสอบหม อแปลงกระแส โปรแกรมช วยทดสอบหม อแปลงกระแส 1.เมน ของโปรแกรม ภาพท 1 หน าเมน ของโปรแกรม Public Class frmmain Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

More information

Chapter 11. Data Files The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Chapter 11. Data Files The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Chapter 11 Data Files McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Chapter Objectives Store and retrieve data in files using streams Save the values from a list box and reload

More information

Chapter. Web Applications

Chapter. Web Applications Chapter Web Applications 144 Essential Visual Basic.NET fast Introduction Earlier versions of Visual Basic were excellent for creating applications which ran on a Windows PC, but increasingly there is

More information

: CREATING WEB BASED APPLICATIONS FOR INSTRUMENT DATA TRANSFER USING VISUAL STUDIO.NET

: CREATING WEB BASED APPLICATIONS FOR INSTRUMENT DATA TRANSFER USING VISUAL STUDIO.NET 2006-938: CREATING WEB BASED APPLICATIONS FOR INSTRUMENT DATA TRANSFER USING VISUAL STUDIO.NET David Hergert, Miami University American Society for Engineering Education, 2006 Page 11.371.1 Creating Web

More information

Organising . page 1 of 8. bbc.co.uk/webwise/accredited-courses/level-one/using- /lessons/your- s/organising-

Organising  . page 1 of 8. bbc.co.uk/webwise/accredited-courses/level-one/using- /lessons/your- s/organising- Organising email Reading emails When someone sends you an email it gets delivered to your inbox, which is where all your emails are stored. Naturally the first thing you ll want to do is read it. In your

More information

Chapter 12. File Input and Output. CS180-Recitation

Chapter 12. File Input and Output. CS180-Recitation Chapter 12 File Input and Output CS180-Recitation Reminders Exam2 Wed Nov 5th. 6:30 pm. Project6 Wed Nov 5th. 10:00 pm. Multitasking: The concurrent operation by one central processing unit of two or more

More information

MATFOR In Visual Basic

MATFOR In Visual Basic Quick Start t t MATFOR In Visual Basic ANCAD INCORPORATED TEL: +886(2) 8923-5411 FAX: +886(2) 2928-9364 support@ancad.com www.ancad.com 2 MATFOR QUICK START Information in this instruction manual is subject

More information

Learning VB.Net. Tutorial 16 Modules

Learning VB.Net. Tutorial 16 Modules Learning VB.Net Tutorial 16 Modules Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it. If

More information

Konark - Writing a KONARK Sample Application

Konark - Writing a KONARK Sample Application icta.ufl.edu http://www.icta.ufl.edu/konarkapp.htm Konark - Writing a KONARK Sample Application We are now going to go through some steps to make a sample application. Hopefully I can shed some insight

More information

Introduction to Managed Code

Introduction to Managed Code McGrath.book Page 89 Thursday, December 7, 2006 10:04 AM 3 Introduction to Managed Code Technology is dominated by two types of people: those who understand what they do not manage, and those who manage

More information

Computing Science Unit 1

Computing Science Unit 1 Computing Science Unit 1 Software Design and Development Programming Practical Tasks Business Information Technology and Enterprise Contents Input Validation Find Min Find Max Linear Search Count Occurrences

More information

CS 302: Introduction to Programming in Java. Lecture 15

CS 302: Introduction to Programming in Java. Lecture 15 CS 302: Introduction to Programming in Java Lecture 15 Class Instances of the class (objects) only valid at runtime Private Instance Methods Instance methods usually public why? If we have an internal

More information

Else. End If End Sub End Class. PDF created with pdffactory trial version

Else. End If End Sub End Class. PDF created with pdffactory trial version Dim a, b, r, m As Single Randomize() a = Fix(Rnd() * 13) b = Fix(Rnd() * 13) Label1.Text = a Label3.Text = b TextBox1.Clear() TextBox1.Focus() Private Sub Button2_Click(ByVal sender As System.Object, ByVal

More information

Remote Web Server. Develop Locally. foldername. publish project files to

Remote Web Server. Develop Locally. foldername. publish project files to Create a Class and Instantiate an Object in a Two-Tier Tier Web App By Susan Miertschin For ITEC 4339 Enterprise Applications Development 9/20/2010 1 Development Model foldername Remote Web Server Develop

More information

Getting Started with IVI-COM Drivers for the Lambda Genesys Power Supply

Getting Started with IVI-COM Drivers for the Lambda Genesys Power Supply Page 1 of 17 1. Introduction This is a step-by-step guide to writing a program to remotely control the Genesys power supply using the Lambda IVI-COM drivers. This tutorial has instructions and sample code

More information

Data Structures. 03 Streams & File I/O

Data Structures. 03 Streams & File I/O David Drohan Data Structures 03 Streams & File I/O JAVA: An Introduction to Problem Solving & Programming, 6 th Ed. By Walter Savitch ISBN 0132162709 2012 Pearson Education, Inc., Upper Saddle River, NJ.

More information

I101/B100 Problem Solving with Computers

I101/B100 Problem Solving with Computers I101/B100 Problem Solving with Computers By: Dr. Hossein Hakimzadeh Computer Science and Informatics IU South Bend 1 What is Visual Basic.Net Visual Basic.Net is the latest reincarnation of Basic language.

More information

Microsoft.NET Programming (C#, ASP.NET,ADO.NET, VB.NET, Crystal Report, Sql Server) Goal: Make the learner proficient in the usage of MS Technologies

Microsoft.NET Programming (C#, ASP.NET,ADO.NET, VB.NET, Crystal Report, Sql Server) Goal: Make the learner proficient in the usage of MS Technologies Microsoft.NET Programming (C#, ASP.NET,ADO.NET, VB.NET, Crystal Report, Sql Server) Goal: Make the learner proficient in the usage of MS Technologies for web applications development using ASP.NET, XML,

More information

S.2 Computer Literacy Question-Answer Book

S.2 Computer Literacy Question-Answer Book S.2 C.L. Half-yearly Examination (2012-13) 1 12-13 S.2 C.L. Question- Answer Book Hong Kong Taoist Association Tang Hin Memorial Secondary School 2012-2013 Half-yearly Examination S.2 Computer Literacy

More information

Chapter 12. OOP: Creating Object- Oriented Programs. McGraw-Hill. Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.

Chapter 12. OOP: Creating Object- Oriented Programs. McGraw-Hill. Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 12 OOP: Creating Object- Oriented Programs McGraw-Hill Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. Objectives (1 of 2) Use object-oriented terminology correctly. Create

More information

ASP.NET Web Forms Programming Using Visual Basic.NET

ASP.NET Web Forms Programming Using Visual Basic.NET ASP.NET Web Forms Programming Using Visual Basic.NET Duration: 35 hours Price: $750 Delivery Option: Attend training via an on-demand, self-paced platform paired with personal instructor facilitation.

More information

Getting Started With AutoCAD Civil 3D.Net Programming

Getting Started With AutoCAD Civil 3D.Net Programming Getting Started With AutoCAD Civil 3D.Net Programming Josh Modglin Advanced Technologies Solutions CP1497 Have you ever wanted to program and customize AutoCAD Civil 3D but cannot seem to make the jump

More information

CMSC 201 Fall 2016 Lab 09 Advanced Debugging

CMSC 201 Fall 2016 Lab 09 Advanced Debugging CMSC 201 Fall 2016 Lab 09 Advanced Debugging Assignment: Lab 09 Advanced Debugging Due Date: During discussion Value: 10 points Part 1: Introduction to Errors Throughout this semester, we have been working

More information

Volume CREATIVE DATA TECHNOLOGIES, INC. DATALAYER.NET. Getting Started Guide

Volume CREATIVE DATA TECHNOLOGIES, INC. DATALAYER.NET. Getting Started Guide Volume 1 CREATIVE DATA TECHNOLOGIES, INC. DATALAYER.NET Getting Started Guide TABLE OF CONTENTS Table of Contents Table of Contents... 1 Chapter 1 - Installation... 2 1.1 Installation Steps... 2 1.1 Creating

More information

Techniques for Adding Value

Techniques for Adding Value C1861587x.fm Page 383 Friday, November 16, 2001 8:59 AM Part IV Techniques for Adding Value 18 Adding Value to Your Applications 385 19 Replacing ActiveX Controls with Windows Forms Controls 403 20 Moving

More information

DC69 C# &.NET JUNE C# is a simple, modern, object oriented language derived from C++ and Java.

DC69 C# &.NET JUNE C# is a simple, modern, object oriented language derived from C++ and Java. Q.2 a. What is C#? Discuss its features in brief. 1. C# is a simple, modern, object oriented language derived from C++ and Java. 2. It aims to combine the high productivity of Visual Basic and the raw

More information

Lecture 10 OOP and VB.Net

Lecture 10 OOP and VB.Net Lecture 10 OOP and VB.Net Pillars of OOP Objects and Classes Encapsulation Inheritance Polymorphism Abstraction Classes A class is a template for an object. An object will have attributes and properties.

More information

Check out the demo video of this application so you know what you will be making in this tutorial.

Check out the demo video of this application so you know what you will be making in this tutorial. Visual Basic - System Information Viewer Welcome to our special tutorial of visual basic. In this tutorial we will use Microsoft visual studio 2010 version. You can download it for free from their website.

More information

Learning VB.Net. Tutorial 15 Structures

Learning VB.Net. Tutorial 15 Structures Learning VB.Net Tutorial 15 Structures Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it.

More information

UNIT 1: PROGRAMMING ENVIRONMENT

UNIT 1: PROGRAMMING ENVIRONMENT UNIT 1: PROGRAMMING ENVIRONMENT 1.1 Introduction This unit introduces the programming environment for the Basic Digital Signal Processing course. It gives a brief description of the Visual Basic classes

More information

Upgrading Distributed Applications

Upgrading Distributed Applications C2161587x.fm Page 435 Friday, November 16, 2001 9:08 AM Upgrading Distributed Applications Until now we haven t really talked about upgrading large-scale distributed applications. But building these types

More information

C# Language. CSE 409 Advanced Internet Technology

C# Language. CSE 409 Advanced Internet Technology C# Language Today You will learn Building a basic class Value Types and Reference Types Understanding Namespaces and Assemblies Advanced Class Programming CSE 409 Advanced Internet Technology Building

More information

UNIVERSITY OF THE FREE STATE DEPARTMENT OF COMPUTER SCIENCE AND INFORMATICS RIS 214 MODULE TEST 1

UNIVERSITY OF THE FREE STATE DEPARTMENT OF COMPUTER SCIENCE AND INFORMATICS RIS 214 MODULE TEST 1 UNIVERSITY OF THE FREE STATE DEPARTMENT OF COMPUTER SCIENCE AND INFORMATICS RIS 214 MODULE TEST 1 DATE: 12 March 2014 TIME: 4 hours MARKS: 220 ASSESSORS: Prof. P.J. Blignaut & Mr G.J. Dollman BONUS MARKS:

More information

Hands-On Lab. Getting Started with Office 2010 Development. Lab version: Last updated: 2/23/2011

Hands-On Lab. Getting Started with Office 2010 Development. Lab version: Last updated: 2/23/2011 Hands-On Lab Getting Started with Office 2010 Development Lab version: 1.0.0 Last updated: 2/23/2011 CONTENTS OVERVIEW... 3 Starting Materials 3 EXERCISE 1: CUSTOMIZING THE OFFICE RIBBON IN OFFICE... 4

More information

Course Syllabus C # Course Title. Who should attend? Course Description

Course Syllabus C # Course Title. Who should attend? Course Description Course Title C # Course Description C # is an elegant and type-safe object-oriented language that enables developers to build a variety of secure and robust applications that run on the.net Framework.

More information

APPENDIX M INTRODUCTION TO THE UML

APPENDIX M INTRODUCTION TO THE UML M INTRODUCTION TO THE UML This appendix, written only for those readers not familiar with the topic, provides a brief introduction, which cannot be considered as exhaustive, to the UML. The UML is a general-purpose

More information

Lesson 6: Using XML Queries

Lesson 6: Using XML Queries Lesson 6: Using XML Queries In the previous lesson you learned how to issue commands and how to retrieve the results of selections using the UniSelectList class, whether for regular enquiry statements

More information

C++ for System Developers with Design Pattern

C++ for System Developers with Design Pattern C++ for System Developers with Design Pattern Introduction: This course introduces the C++ language for use on real time and embedded applications. The first part of the course focuses on the language

More information

IOS Plus Trade - Web Services Version 4 Walkthrough

IOS Plus Trade - Web Services Version 4 Walkthrough IOS Plus Trade - Web Services Version 4 Walkthrough Visual Basic 2008 sample to retrieve IOS Plus Trade information The purpose of this walkthrough is to build the following Windows Forms Application that

More information