Product Summary |
www.edelwise.com |
Price: $24.95 |
Choose this product if you have only a limited need for task-to-task communication. This product allows you to create a maximum of 32 shared beWISE variables. It’s a low-cost entry into the world of Inter-Process Communication. |
Example “Discussing”: This example shows how two programs, HANS and KARL, can have a ‘discussion’. I.e. how the two programs can communicate both ways using two beWISE variables of different type. In the example HANS counts the Edelweiss that he sees in the field and reports them to KARL via the “EdelweissFound” variable. But he does that under strict supervision from KARL. KARL can give HANS orders via the “KARLtoHANS” variable. KARL can order HANS to start and stop counting the Edelweiss or to count faster or slow down. In fact the program KARL is actually remote-controlling the program HANS. Program HANS:
Dim MyCounter As beWISE.var_INTEGER 'number we report to KARL Dim WithEvents KarlSays As beWISE.var_STRING 'commands from KARL Private Sub Form1_Load(ByVal sender As System.Object, _ MyCounter = Create.New_var_INTEGER("EdelweissFound") KarlSays = Create.New_var_STRING("KARLtoHANS") End Sub Private Sub KarlSays_Changed() Handles KarlSays.Changed Select Case KarlSays.Value Case "Start" Increment.Enabled = True Case "Stop" Increment.Enabled = False Case "Faster" Increment.Interval = 50 Case "Slower" Increment.Interval = 200 End Select End Sub Private Sub Increment_Tick(ByVal sender As System.Object, _ MyCounter.Value += 1 End Sub
Program KARL:
Dim TellHans As beWISE.var_STRING 'commands we give HANS Dim WithEvents MyCounter As beWISE.var_INTEGER 'number HANS counts Private Sub Form1_Load(ByVal sender As System.Object, _ MyCounter = Create.New_var_INTEGER("EdelweissFound") TellHans = Create.New_var_STRING("KARLtoHANS") End Sub Private Sub MyCounter_Changed() Handles MyCounter.Changed EdelwiseLabel.Text = Format(MyCounter.Value, "#####0") End Sub Private Sub StartCounting_Click(ByVal sender As System.Object, _ TellHans.Value = "Start" End Sub Private Sub StopCounting_Click(ByVal sender As System.Object, _ TellHans.Value = "Stop" End Sub Private Sub CountFaster_Click(ByVal sender As System.Object, _ TellHans.Value = "Faster" End Sub Private Sub SlowDown_Click(ByVal sender As System.Object, _ TellHans.Value = "Slower" End Sub |
The Essential Resource for Visual Basic Developers |
Home | beWISE Features | VB6 Products | VB.NET Products | Tools | FAQ | Project List | User Forum | Legal | About Us |