Products & Services Solutions Academia Support User Community Company

Learn more about xPC Target   

Microsoft Visual Basic 7.1 (.NET 2003) Demo

Introduction

To help you better understand and quickly begin to use COM API functions to create custom GUI applications, the xPC Target environment provides a number of API demos and scripts in the C:\matlabroot\toolbox\rtw\targets\xpc\api directory. This topic briefly describes those demos and scripts.

The Microsoft Visual Basic .NET 2003 demo illustrates how to create a custom GUI that connects to a target PC with a downloaded target application. The solution file for this demo is located in

C:\matlabroot\toolbox\rtw\targets\xpc\api\VBNET\SigsAndParamsDemo

The Demo.sln file contains all the Visual Basic .NET 2003 files to run the windows form application. This demo is a functional application that you can use as a template to create your own custom GUIs.

The COM API example from Example Visual Basic GUI Using COM Objects is a simple GUI that illustrates some basic concepts for creating a GUI with the COM API. The Demo solution is a more advanced example that illustrates how to create a GUI similar to the xPC Target Explorer. The Demo solution is fully commented.

This demo illustrates how you can use the COM API to create a GUI that

Before Starting

To use the Demo solution, you need

The xPC Target product ships with an executable version of the demo. If you want to rebuild the Demo solution, of if you want to write your own custom GUIs like this one, you need Microsoft Visual Basic .NET 2003 installed on the host PC.

Accessing the Demo Project Solution

To access the Demo solution,

  1. Copy the contents of the VBNET directory to a writable directory of your choice.

  2. Change directory to the one that contains your copy of the Demo solution.

  3. Double-click demo.sln.

    The Microsoft Development Environment for Visual Basic application starts.

  4. In the Solution Explorer pane, double-click Form1.vb to display the Demo solution form.

    The form is displayed. You can inspect the layout of the demo.

  5. To inspect the form code, select the View menu Code option.

    The Visual Basic code for the form is displayed.

Rebuilding the Demo Project Solution

To rebuild the Demo solution,

  1. Double-click demo.sln.

    The Microsoft Development Environment for Visual Basic application starts.

  2. Select the Build menu Build Solution option.

Using the Demo Executable

To use the Demo solution executable,

  1. Change directory to the one that contains your copy of the Demo solution.

  2. Change directory to the bin directory.

  3. Double-click Demo1.exe.

    The GUI is displayed.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS