Chapter 12 Making Tools Week 7 Fall 2006. Tools (events) besides Click MouseDown, MouseUp, MouseMove CursorID defines mouse appearance Eabled to disable.

Slides:



Advertisements
Similar presentations
Lists, Loops, Validation, and More
Advertisements

Chapter 9 Color, Sound and Graphics
Using Macros and Visual Basic for Applications (VBA) with Excel
How to get started with Excel VBA. We need to enable programming in Excel  the “Developer menu”
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 21 - “Cat and Mouse” Painter Application.
IS 1181 IS 118 Introduction to Development Tools VB Chapter 06.
Compunet Corporation Programming with Visual Studio.NET GUI Week 13 Tariq Aziz and Kevin Jones.
1 CA203 Presentation Application Presentations by using PowerPoint Lecture # 1 By Tariq Ibn Aziz Dammam Community college.
Using Powerpoint to Create Interface Prototype Copy & Paste Interface Designs –Use Screen Capture to Copy Existing Interface –“Print Screen / SysRq” Button:
Mouse draw Using the mouse and a palette to make a picture.
GTECH 731 Lab Session 6 10/12/10 Quiz Review Lab 5 Review Lab 6 Intro.
User Interface Programming in C#: Direct Manipulation Chris North CS 3724: HCI.
How to annotate an X-ray in the client file PURPOSE - To mark up x-rays or other images after they are loaded to the client file PREREQUISITES - Basic.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
Unit 20: Event Driven Programming
Adv_GISArcObjects - 11 VBA and ArcObjects Fall 2003 Advanced GIS.
1 Visual Basic for Applications (VBA) for Excel Prof. Yitzchak Rosenthal.
Adv_GISArcObjects - 11 VBA and ArcObjects Programming Week 1 Spring 2008 Advanced GIS.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Web Feature Data Access Pages.
Let’s get started using Visual Basic!. Private Sub cmdGo_Click... Dim strMessage As String Dim sngSum As Single If IsNumeric(txtNumber1.Text) = False.
Visual Basic .NET BASICS
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 5 Decision Making.
Automatic Turntable Calculation Tool Melissa J Rura CE 508 Dr. Shan 10/29/2004.
Lecture Set 13 Drawing Mouse and Keyboard Events Part B – Mouse and Keyboard Events.
Copyright © 2001 by Wiley. All rights reserved. Chapter 2: Using Visual Basic to Create a First Project Getting Started with VB Development Environment.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
Word 2010 Vocabulary List 1. Click and Type - A feature that allows you to double-click a blank area of a document to position the cursor in that location,
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
© 2011 Delmar, Cengage Learning Chapter 1 Getting to Know Illustrator.
Chapter Two Creating a First Project in Visual Basic.
Adding shapefiles as feature layers Adding coverages as feature layers Adding grids as raster layers Adding tables as table windows Adding text files as.
BIM211 – Visual Programming Interacting with Users Graphics 1.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 21 - “Cat and Mouse” Painter Application.
ADV_GISVB - IV1 Advanced GIS Objects/Interfaces Week Spring.
The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include: a rich set of user interface components; a.
Visual Basic CDA College Limassol Campus Lecture:Pelekanou Olga Semester C Week - 1.
PROGRAMMING IN VISUAL BASIC.NET VISUAL BASIC PROGRAMMING FUNDAMENTALS Bilal Munir Mughal 1 Chapter-8.
Chapter 8: Plotting. After completing this Chapter, you will be able to use the following features: Planning the Plot Sheet Plotting Environments Plotting.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Project 5 : programming ArcObject with VBA Part I Vector data Sherry Fu CE 697V Nov. 30, 2006.
1 2 Left Click 3 Left Click 4 Left Click NOTE: Your screen may look different; however, find the Start button (lower left corner); then All Programs; ending.
PREZI PRESENTATION The Prezi Interface. In this tutorial you will learn:  About the different parts of a Prezi interface: 1. The Prezi space/canvas 2.
Chapter 11 Navigating Object Model Diagrams Week 6, 2008 Spring.
Lesson 1. Security At the menu bar at the top you will see the word Tools. Click your mouse on Tools scroll down to Macro. Move the Mouse over and down.
PowerPoint Lesson 1 and 2--Part 2 Review Make a review sheet by numbering as shown below. The test is timed. You can practice again if needed. Click the.
Microsoft Word 2000, Margins ITSW 1401, Intro to Word Processing Instructor: Glenda H. Easter.
Visual Basic. The Close Method The Close method is used to close a form. To close a form use the keyword Me to refer to the form. Me.Close()
CSC 230 (Blum)1 Visual Basic 2005 Hello World Fall 2005 T. Blum.
Animating Objects in PowerPoint XP/2003 Using Motion Paths and Custom Animations to add interest to your classroom presentations.
CIS 338: Events Dr. Ralph D. Westfall April, 2011.
PaintPictureBoxDemo Refers to the PaintPictureBoxDemo Visual Basic Program Included With The Lecture.
What is a Laser Mouse? Laser Mouse is a tool that will enable users to control a mouse on a projection screen using a laser pointer. Users will no longer.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
UNIT 1: Introduction To The AutoCAD Interface Objectives: Be able to identify, describe and/or apply… The key components of AutoCAD interface The AutoCAD.
Dreamweaver MX. 2 Timeline Overview (p. 480) n Animations can be achieved with DHTML (__________ HTML) using JavaScript code and _____ or later browsers.
Pixel Editor PX 1.0 Ajay Prasad.
PYGAME.
Development of Linear Measure Tool using Application Framework
Using Google “My Maps”.
Module 1: Getting Started with Windows 95
Symbolizing elements and layers(I)
Lecture 4 An example for changing a layer’s Name
Smoke PITs How to locate, mark the location of a facility’s smoke pit(s), and download into GeoBase.
CS285 Introduction - Visual Basic
1 To go to the next slide, click this button instead. A random slide will come up.
How to locate and mark the location of your facility’s smoke pit(s)
NPC PowerPoint Guidelines 2019
OSI MAPGENIE MapGenie is an online service which provides access to various Ordnance Survey Ireland (OSI) mapping series It includes historic 19th century.
Presentation transcript:

Chapter 12 Making Tools Week 7 Fall 2006

Tools (events) besides Click MouseDown, MouseUp, MouseMove CursorID defines mouse appearance Eabled to disable tool when necessary MouseDown events(x/y are pixel locations, not coordinates, you need to use IMxDocument.CuurentLocation to obtain them) Private Sub UIToolControl_MouseDown ( _ button As Long, shift As Long, x As Long, y As Long) MsgBox “X: “ & x & “, Y: “ & y End Sub Button=1 – holding down the left button, =2, right button Shift=0, not depressed, 1 : depressed

IPoint IMxDocument: CurrentLocaiton: IPoint. –pMxDoc.CurrentLocation will return an IPoint object, from which X and Y can be determined From IPoint, X,Y return current location: For example: Dim pMxDoc As IMxDocument Set pMxDoc = ThisDocument Dim pPoint As IPoint Set pPoint = pMxDoc.CurrentLocation MsgBox “Longitude: “ & pPoint.X & “, Latitude: “ & pPoint.Y

Status Bar IApplication.StatusBar returns an object of IStatusBar (for example: Dim pStatus As IStatusBar Set pStatus = Application.StatusBar 4 panels of message bars, starting from 0. pStatus.Message(0) = “Lat: “ & pPoint.y… pStatus.Message(1) = “Hello, this is message is from Adv GIS”

Drawing graphics Graphics on map – follow map units Graphics on layout – follow inches or cm Graphics belong to abstract class called Element (p. 212) Map and PageLayout have Element. Create objects out of GraphicElement coclass which include LineElement, TextElement and MarkerElement Element is associated with geometry objects – point, line and polygon Geometry is the starting point to create graphic elements

MarkerElement MarkerElement is the point’s visual representation, required…. Otherwise, your point is just an abstract identity… Once created, MarkerElement must be associated with your existing point. QI is shown in these steps (next slide)

Code examples – create marker Fore example: create a marker to mark city location. –1) Create a point Dim pPoint As IPoint Set pPoint = New Point pPoint.X = 0 ‘London, long and lat pPoint.Y = 53.5 –2) Create new marker element Dim pMarkerElement As IMarkerElement Set pMarkerElement = New MarkerElement -3) Associate the point with the marker element Dim pElement As IElement ‘Switch interfaces to IElement from IMarkerElement Set pElement = pMarkerElement pElement.Geometry = pPoint

IContainer -4) Add to the IGraphicsContainer Dim pMap As IMap ‘FocusMap return IMap, switch to IGraphicsContainer Set pMap = pMxDoc.FocusMap Dim pGraphics As IGraphicsContainer Set pGraphics = pMap -Always take 4 lines to get the interface you need. Two to declare and set the interface you don’t need and two more to declare and set the interface variable that you want. For a shortcut example, see next slide

To save two steps If you don’t need IMap object, then simply use pMxDoc.FocusMap to get IMap object, instead of declare one. Dim pGraphics As IGraphicsContainer Set pGraphics = pMxDoc.FocusMap Next, add graphics into graphicscontainer pGraphics.AddElement pElement, 0

Partial Refresh pActiveView.PartialRefresh _ esriViewGraphics, pElement, Nothing Which caches are refreshed Which layers/elements are refreshed Which parts of the screen are refreshed (envelope) Caches – screen capture of active view area