‘Tirgul’ # 7 Enterprise Development Using Visual Basic 6.0 Autumn 2002 Tirgul #7.

Slides:



Advertisements
Similar presentations
Creating a Dialog-Based Comet Windows Program Brian Levantine.
Advertisements

Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Using VB with MS Applications R. Juhl, Delta College.
COM vs. CORBA.
KompoZer. This is what KompoZer will look like with a blank document open. As you can see, there are a lot of icons for beginning users. But don't be.
Endnote Tutorial The Version pictured is version 9.0 May 8, 2007.
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Managing Your Learners In this guide you will learn how to: Add classes to the Manage Your Learners page Add learners to the Manage Your Learners page.
NAMESPACES AND VISUAL INHERITANCE. OBJECTIVES In this chapter, I will cover the following: Using namespaces Visual inheritance.
Programming with Objects: Class Libraries and Reusable Code.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Introduction to VBA. This is not Introduction to Excel We’re going to assume you have a basic level of familiarity with Excel If you don’t, or you need.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Microsoft Visual Basic 2008 CHAPTER ELEVEN Multiple Classes and Inheritance.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Classes and Class Libraries Examples and Hints November 9,
1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
Lab 8 – C# Programming Adding two numbers CSCI 6303 – Principles of I.T. Dr. Abraham Fall 2012.
A First Program Using C#
Visual Basic: An Object Oriented Approach 12 – Creating and using ActiveX objects.
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials Software: Building apps Suitable for: Advanced.
SCRAM Software Configuration, Release And Management Background SCRAM has been developed to enable large, geographically dispersed and autonomous groups.
Hello World In C++ and Microsoft Visual C++. Directions to begin a project 1. Go to All Programs 2. Open Visual Studio C++ 3. Click on New Project 4.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Installing the SAFARIODBC.EXE For use with Excel May 3, 2002.
CIS 338: Creating ActiveX Controls Dr. Ralph D. Westfall March, 2003.
Lab 9 – User Forms Design. User Forms What are user forms? –Known as dialog boxes –Major ways for getting user input An example of using user forms: Monthly.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
Microsoft Visual Basic 2008 CHAPTER 8 Using Procedures and Exception Handling.
Ch 11: Userforms CP212 Winter Topics Designing User Forms o Controls Setting Properties o Tab Order o Testing Writing Event Handlers o Userform_Initialize.
Microsoft Visual Basic 2008 CHAPTER ELEVEN Multiple Classes and Inheritance.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
IE 411/511: Visual Programming for Industrial Applications
E-Commerce: Introduction to Web Development 1 Dr. Lawrence West, Management Dept., University of Central Florida Topics What is a Web.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
Spreadsheets in Finance and Forecasting Presentation 9 Macros.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
Just as there are many human languages, there are many computer programming languages that can be used to develop software. Some are named after people,
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Program Design and Coding
Microsoft Visual Basic 2010 CHAPTER THREE Program Design and Coding.
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
1 Course Title: Visual Basic Programming Topic: Introduction to programming Languages (Visual basic 6.0) Lecturer: Mahamud Ahmed Jimale, BsIT, MsCs, CCNA,
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
From Lucent, Inc. This is the Sablime® home page. It has access to all the functionality of the Sablime® Configuration Management System.
1 What to do before class starts??? Download the sample database from the k: drive to the u: drive or to your flash drive. The database is named “FormBelmont.accdb”
MS Visual Basic 6 Walter Milner. VB 6 0 Introduction –background to VB, A hello World program 1 Core language 1 –Projects, data types, variables, forms,
Microsoft Visual Basic 2008 CHAPTER ELEVEN Multiple Classes and Inheritance.
Microsoft Visual Basic 2012 CHAPTER ELEVEN Multiple Classes and Inheritance.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
1 Visual Basic Part I - A tool for customizing your program Principles of GIS
This is how you invoke the Microsoft Visual Studio 2010 Software. All Programs >> Microsoft Visual Studio 2010.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
1 of 6 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
VB.NET and Databases. ADO.NET VB.Net allows you many ways to connect to a database. The technology used to interact with a database or data source is.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
XP New Perspectives on Creating Web Pages With Word Tutorial 1 1 Creating Web Pages With Word Tutorial 1.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Computing and Information Technology Building a Web Browser
Introduction to Computer CC111
1. Introduction to Visual Basic
Using Procedures and Exception Handling
MVC Framework, in general.
VISUAL BASIC.
Tonga Institute of Higher Education
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Presentation transcript:

‘Tirgul’ # 7 Enterprise Development Using Visual Basic 6.0 Autumn 2002 Tirgul #7

‘Tirgul’ # 7 Objectives Brief on COM COM and Classes ActiveX DllCreating Objects – ActiveX Dll Registering an Object Version Compatibility issues

‘Tirgul’ # 7 Abstract In the world of the enterprise, employers want that something more then just Forms and Controls That something is called COM –It's a way of organizing your code so it can be used over and over again. –It's a method of helping create a bug-free development environment. –Just after making your life a little harder, makes it lot easier.

‘Tirgul’ # 7 What is COM? you're already a COM programmer! –Every time you set the Text property of a Text Box, you're using COM. COM is a method of communication

‘Tirgul’ # 7 COM is a method of communication Imagine a television remote control –You press button one and the television tunes into Channel 1, 2… –You press the power button and the television turns itself off. You just press the button and it jumps into action.

‘Tirgul’ # 7 COM is a method of communication That’s applies to the world of programming. You don't really know what happens when you change the Text property of your Text Box. Under the covers, it's probably making two-dozen API calls – but to the end user, it just displays a certain piece of text in the box.

‘Tirgul’ # 7 COM is a way of reusing code You can use Com Object again and again anywhere. –A COM widget could be accessed from any program at any time. (Visual Basic, Excel C++ Program) So COM is all about creating 'widgets' that can be reused.

‘Tirgul’ # 7 COM is based around real-life objects After COM have been made, it’s easy to use. Add a customer –Instead of adding lots of data access code, validation algorithms, and weighty database DLLs to your application – wouldn't it be easier to run something likeCustomer.Add

‘Tirgul’ # 7 Classes -> COM All of our work will be surrounding the creation of a class – which could later be turned into a real life COM object

‘Tirgul’ # 7 Classes check list Variables Properties (Let/Get) (hopefully).. Subs, Functions, Parameters Collection What else? –Enumeration –Events – Not in the scope

‘Tirgul’ # 7 create a real-life COM object ActiveX DLL – A.DLL program that contains classes. ActiveX EXE – A.EXE program that contains classes. ActiveX Control – A project that allows you to create controls in your toolbox. ActiveX Document EXE – A program that runs on a Web page, in.EXE format. ActiveX Document DLL – As above, but.DLL format.

‘Tirgul’ # 7 My first object! We have discussed objects as controls in VB (Textbox, ComboBox) - you should be remembering these by now!) When you make a control, it has a user interface (that means you can visually see something on the screen, such as the textbox itself Another kind of object is one that doesn't have a user interface, and we call this a DLL (or Dynamic Link Library if you want to impress your friends).

‘Tirgul’ # 7 ActiveX Dll Click File, New Project and select ActiveX DLL: make sure that the Instancing property is set to 5 – MultiUse, Allows us to compile the DLL and expose the class module to other programs (such as the object browser.

‘Tirgul’ # 7 Build the DLL Save the project, and a click File, Make Project1.DLL. You've just complied your first Dll object!

‘Tirgul’ # 7 Testing.. Add another project - File, Add Project, Standard EXE. Because a DLL is not a control, we need to make a reference to it (because we are not loading any kind of user interface)

‘Tirgul’ # 7 Testing.. Click File, References and scroll down and select Project1:

‘Tirgul’ # 7 Browsing the Object press F2 to load up the object browser and select Projec1 from the combo box. Check the Methods..

‘Tirgul’ # 7 Explanation An ActiveX DLL's code is executed within the main program's address space. It behaves as if the class was created within the main program's code. Because the code lies inside the program's address space, calling methods is very fast.

‘Tirgul’ # 7 Registering a component when you come to distribute your DLL to another machine and it doesn't work.. Each DLL (or component) on your machine has to be registered (including controls). Once registered, an entry in to the registry is made.

‘Tirgul’ # 7 Using Regsvr32 Tool Microsoft tool for registring DLL ’ s and OCX ’ s Simply Drag the Object into the TextBox

‘Tirgul’ # 7 Main sub In the module you can add a main sub: Sub main ‘Add code that will run when the ‘component is created End Sub

‘Tirgul’ # 7 Compatibility Problem: –compile the ActiveX DLL, –then compiled a test program that used our DLL. –Then we recompiled our DLL – something you usually do after you make changes. Suddenly, our test program no longer worked!

‘Tirgul’ # 7 Compatibility Open up your project Click 'Project Properties' Click the 'Component' tab

‘Tirgul’ # 7 Version Compatibility No Compatibility – When compiled, your COM component gets assigned a new 'signature'. Programs looking for older 'signatures' (the previous version of the DLL) – simply flop Project Compatibility – When compiled, your COM component is assigned a new signature – and still, any using-applications still flop. The only change here is that 'big' differences between your current project and a previous DLL project are highlighted as you compile. Binary Compatibility – When compiled, your application attempts to keep the signature of a previously compiled DLL, thus ensuring any applications using it don't magically turn into the Blue Screen of Death. However if the differences between your previously compiled DLL and your to-be-compiled DLL are too great, a new signature must be assigned

‘Tirgul’ # 7 ActiveX DLL Creation Summary 1.Determine the features your component will provide. 2.Determine what objects are required to divide the functionality of the component in a logical fashion When you create a new ActiveX DLL, the steps you ’ ll generally follow are these:

‘Tirgul’ # 7 ActiveX DLL Creation Summary 3.Design any forms your component will display. 4.Design the interface — that is, the properties, methods, and events — for each class provided by your component. 5.Create a project group consisting of your component project and a test project.

‘Tirgul’ # 7 ActiveX DLL Creation Summary 6.Implement the forms required by your component 7.Implement the interface of each class. 8.As you add each interface element or feature, add features to your test project to exercise the new functionality. 9.Compile your DLL and test it with all potential target applications.