Example “Counting”:

 

This example shows how one VB program, called HANS, creates a variable with the name “EdelweissFound” and constantly increments it using a timer.

A second VB program, called KARL, creates the same variable. Using the ‘WithEvents’ statement KARL installs an event handler for the variable. This allows KARL to be notified whenever the value of the variable changes. Every time HANS increments the “EdelweissFound” variable, KARL’s MyCounter_Changed() event handler is executed and the value of the “EdelweissFound” variable is displayed.

 

Program HANS:


Dim Create As New beWISE.Functions 'REQUIRED definition

Dim MyCounter As beWISE.var_INTEGER

 

Private Sub Form1_Load(ByVal sender As System.Object, _

                ByVal e As System.EventArgs) Handles MyBase.Load

    MyCounter = Create.New_var_INTEGER("EdelweissFound")

End Sub

 

Private Sub Increment_Tick(ByVal sender As System.Object, _

                ByVal e As System.EventArgs) Handles Increment.Tick

    MyCounter.Value = MyCounter.Value + 1

End Sub

 

 

Program KARL:


Dim Create As New beWISE.Functions 'REQUIRED definition

Dim WithEvents MyCounter As beWISE.var_INTEGER

 

Private Sub Form1_Load(ByVal sender As System.Object, _

                ByVal e As System.EventArgs) Handles MyBase.Load

    MyCounter = Create.New_var_INTEGER("EdelweissFound")

End Sub

 

Private Sub MyCounter_Changed() Handles MyCounter.Changed

    EdelwiseLabel.Text = Format(MyCounter.Value, "#####0")

End Sub

 

HANS can talk to all of KARL’s twin brothers at the same time. I.e. you can start KARL.exe as many times as you want. Each instance will receive its separate ‘Changed’ event and display the correct “EdelweissFound” counter.

Text Box: Features
allows 1 (one) SHARED variable
INTEGER only
provides CHANGED events

www.edelwise.com

Text Box: beWISE .NET FREEWARE

This product allows you to share 1 (one) variable of type INTEGER among your VB.NET programs. If you just want to synchronize different VB.NET applications during runtime, then this is all you need.

Product Summary

FREE

Other useful links:  product FAQ    product comparison chart    product licensing

The Essential Resource for Visual Basic Developers

Text Box: Documentation
Documentation is included in the installation package. Latest versions may be downloaded using the link below.
Text Box: Installation Instructions
Before installing this version make sure to uninstall any previous installation of this or any other beWISE product. Use the Control Panel to remove the programs.
To begin with the installation start the beWISEfree.exe file. The program will guide you thru the installation process.
During installation the directory 
 .\Edelwise\ is created under your programs folder. In the English version of Windows this folder is C:\Program Files\Edelwise\
The VB6 specific sample code can be found in the directory
.\Edelwise\VB6.Samples\
You can immediately compile and run the sample programs.
Text Box: Supported Platforms
Windows 2000 (SP3 and higher)
Windows XP 
Visual Basic 2005 
Platforms other than the ones mentioned above are currently not supported.