Back to Home
Visual Graph Home
TriSun Software Inc. Home

Visual Graph Site Menu
Home
What is Visual Graph?
Screenshots
50 Technical Features
Getting Started
Abundant Graphic Libraries
File Format
FAQ
Online Demo (IE Only)
Common Applications
Visual Graph Getting Started
Use VG Component in Delphi 6
Use VG Component in VB6
Use Graphic Library
Change Element's Shape
Customize Property
Make Graphic Button
Get the Selected Elements
Dynamically Create Graph
Movable Label
Link Point
Access Properties
Use Line Vertexes
Call Windows API Functions
Call Visual Graph Functions
Callback Control Event in Script
Drag Graph in Run Mode
Detail Report
Make and Use Dialog Box

Visual Graph Getting Started - Call Windows API Functions

Though Visual Graph is a graphic platform, but it can call Windows API functions also. Now we explain how to do this through playing sound.

1. Create a new file in Visual Graph IDE.

2. Double-click OnLoad event in the Functions view and write the following code:

extern void = PlaySound( string, int, int ) in winmm.dll name PlaySoundW
' Please change .wav path.
PlaySound( 'h:\start.wav', 0, $20000 + 1 )


Please click Program -> Run menu item to test it.

As above, we use extern keyword to quote the Windows API function PlaysoundW, similarly, you can use extern to quote other Windows API functions or the functions that stored in other DLL files.

Sitemap | Legal Notices | Privacy Policy | Contact Us | About Us
Copyright© 2001-2024 TriSun Software Inc. All rights reserved.