Chapter 15
1 / 14

Chapter 15 - PowerPoint PPT Presentation

  • Uploaded on

Chapter 15. Advanced Topics in VB. 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. Introduction.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' Chapter 15' - jackson-webb

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Chapter 15

Chapter 15

Advanced Topics in VB

Advanced topics in vb
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


  • 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

Activex controls
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

Activex controls1
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

Activex controls cont d
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

Creating activex controls
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

Dynamic link libraries
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

Calling a dll procedure
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

Object linking and embedding
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

Visual basic for applications vba
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

Multiple document interface mdi
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)

Defining shortcut menus
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

The report designer
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