Back to Home
Visual Graph Home
TriSun Software Inc. Home
Visual Graph Site Menu
What is Visual Graph?
50 Technical Features
Abundant Graphic Libraries
Online Demo (IE Only)
Visual Graph Getting Started
Use VG Component in Delphi 6
Use VG Component in VB6
Use Graphic Library
Change Element's Shape
Make Graphic Button
Get the Selected Elements
Dynamically Create Graph
Use Line Vertexes
Call Windows API Functions
Call Visual Graph Functions
Callback Control Event in Script
Drag Graph in Run Mode
Make and Use Dialog Box
Visual Graph Getting Started - Use Graphic LibraryVisual Graph has the ability to easily design/develop the powerful graphic library. An example in VB6:
1. Create a new project in VB6, right-click on Toolbox and select Components, and then check Visual Graph ActiveX Control and click <OK>.
2. Click vgctrl in Toolbox, and then draw an instance on Form1, this control will be used to draw.
3. Draw another vgctrl on Form1 again, the associated file of this control will be used as graphic library. Please place this control under the first vgctrl, and fully reduce it.
4. Double-click Form1 and write the following code in Form_Load event:
' Use power.tbl file as graphic library.
' Please change the Visual Graph home path according to your deployment.
5. Draw a CommandButton on Form1, double-click it and write the following code in Command1_Click event:
' When you draw on vgctrl1, Visual Graph will search "VKnife" element in the associated file of vgctrl2.
vgctrl1.vg.NewUnit vgctrl2.vg, "VKnife"
6. Draw a CommandButton on Form1 again, double-click it and write the following code in Command2_Click event:
vgctrl1.vg.ActiveSheet.AddUnit vgctrl2.vg, "VKnife"
7. Run this project, click Command1 and Command2 to test your demo. The running interface might look like this:
Legal Notices |
Contact Us |
Copyright© 2004-2017 TriSun Software Inc. All rights reserved.