English

How To: Incorporate Visual Basic and Avenue in ArcView 3.x

Summary

Why use Visual Basic? The Microsoft Visual Basic programming system allows you to create attractive and effective graphical user interfaces (GUI) tailored to meet the specific needs of your ArcView application.

By integrating Visual Basic with ArcView, you exploit the rich toolset Visual Basic provides and create custom dialog boxes that would be difficult to create with Avenue alone. For example, you might use Visual Basic to create an interface to access functionality contained in an Avenue script.

Procedure

  • Communicating through DDE. ArcView and Visual Basic communicate through a mechanism called Dynamic Data Exchange (DDE). Supported by the Microsoft Windows operating system, DDE enables two applications to talk to each other by continuously and automatically exchanging data. While you can easily exchange information by copying and pasting data between applications, DDE automates this process, providing a direct link between a Visual Basic application and ArcView. Communication through DDE, however, is not restricted to Visual Basic and ArcView; ArcView can communicate with any application that supports DDE.

    DDE does have one limitation: the applications exchanging data must be running on the same computer; DDE does not support networks. Windows for Workgroups version 3.1 (or higher) has addressed this problem with Network DDE, which extends DDE functionality from a local to a network environment. A discussion of Network DDE is beyond the scope of this document. Consult the Microsoft Developers Network CD for additional information.

    Note:
    For detailed information on DDE please access the ArcView Help topic "DDE" from the Index tab.

  • The following examples demonstrate how to establish a conversation between ArcView and a Visual Basic application. The first example shows how to start ArcView from a Visual Basic form and then send requests to ArcView that, for example, open a view. The second example shows how to use a Visual Basic form to display the field definition of a field in an ArcView table.

    Launch ArcView from Visual Basic
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/19651' target='_blank'>How To: Launch ArcView from Visual Basic</a>

    Launch Visual Basic from ArcView
    <a href='http://support.esri.com/en/knowledgebase/techarticles/detail/19652' target='_blank'>How To: Launch Visual Basic from ArcView</a>

Related Information