Download presentation
Presentation is loading. Please wait.
Published byDarlene Jacobs Modified over 9 years ago
1
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San Diego
2
Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Ch15: Advanced Topics in VB Using ActiveX controls Linking from VB to a Web site Include DLL procedures in your projects Understand Windows API Use OLE container VB and VBA Differentiating between MDI and SDI interfaces
3
Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Introduction Windows programs have access to other objects through –ActiveX controls –OLE (Object Linking and Embedding) –DLLs (Dynamic Link Libraries) MDI interface allows multiple forms within an application—such as Excel or Word
4
Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill ActiveX Controls Refers to executable files, controls (COM), and DLLs that are used in multiple applications Microsoft refers to any controls as ActiveX controls. They can be home brew or part of a package VB controls are called intrinsic controls Controls that are added are called components
5
Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill ActiveX Controls Tabbed dialog box has several properties that can be set at design or run time Click the builder button in the tab’s Custom property Place controls on tabbed dialog boxes by manually drawing them—double-clicking a tool places the control on every tab page
6
Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill ActiveX Controls (cont'd) You can also purchase ActiveX controls ActiveX control files end in.OCX or.VBX Project, Components lists controls—most are.OCX The Web Browser control allows you to browse the Web from VB—control is one of the extra components
7
Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Creating ActiveX Controls Select ActiveX control, ActiveX EXE or ActiveX DLL in the New Project dialog box Create an ActiveX control comprising a calendar control, a text box, and a command button
8
Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Dynamic Link Libraries Libraries store frequently used procedures Windows uses dynamic link libraries (DLLs) so store collections of executable procedures Windows DLL procedures are available to VB programs DLLs that are used to move/resize windows are called APIs (application programming interfaces) Most DLLs require arguments that you pass to them
9
Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Calling a DLL Procedure Call a procedure within the scope of a declare statement Arguments to procedure can be constants or variables Windows provides an API viewer to get help on DLL procedures
10
Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Object Linking and Embedding OLE allows you to link or embed objects from another application into VB project Linking: access object maintained by another program; shared object stored elsewhere Embedding: object and ref. to application managing object are stored in your project
11
Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Visual Basic for Applications (VBA) Microsoft office products include VBA for writing procedures to automate office applications (Excel, Word, etc.) Record Excel macros that accomplish a series of steps Macros are stored as VBA code Open code and inspect it
12
Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Multiple Document Interface (MDI) MDI interface is one in which several child forms can be open with a larger, parent form Word and Excel both are examples of MDI You can open, close, and resize each child window (form)
13
Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill Defining Shortcut Menus Create shortcut menus (right-click accessible menus) with the Menu Editor Clear the visible checkbox of a shortcut menu so it is invisible until the user calls for it Code is required to display the shortcut menu
14
Copyright© 2000 by the McGraw-Hill Companies, Inc.Irwin/McGraw-Hill The Report Designer VB’s Report Designer creates a printed report Reports based on a database use the Data Environment Once created, use Show to display it on screen or print it with the PrintReport method A report design is its template
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.