VERSION 5.00
Begin VB.Form call 
   Caption         =   "call"
   ClientHeight    =   2025
   ClientLeft      =   60
   ClientTop       =   390
   ClientWidth     =   1920
   LinkTopic       =   "Form1"
   ScaleHeight     =   2025
   ScaleWidth      =   1920
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton ShowJ 
      Caption         =   "Show J"
      Default         =   -1  'True
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   1575
   End
   Begin VB.CommandButton Run 
      Caption         =   "Run"
      Height          =   375
      Left            =   120
      TabIndex        =   2
      Top             =   1080
      Width           =   1575
   End
   Begin VB.CommandButton Close 
      Caption         =   "Close"
      Height          =   375
      Left            =   120
      TabIndex        =   3
      Top             =   1560
      Width           =   1575
   End
   Begin VB.CommandButton Profile 
      Caption         =   "Load Profile"
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   600
      Width           =   1575
   End
End
Attribute VB_Name = "call"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Following has examples of loading the J EXE server.
'
' J is loaded when the project is run
'
' The form has 3 buttons:
'
' Show J  - shows J using a minimal ijx window
' Load Profile  - loads J profile, with normal ijx window
' Run - simple example of calling J
' Close - close form

Option Explicit
Dim J As Object

Private Sub Close_Click()
End
End Sub

Private Sub Form_Load()
Dim rc As Integer
Dim res As Variant
Set J = CreateObject("jexeserver")
J.Quit                  ' close J server when VB form closes
J.Do "exit_z_=: 2!:55"  ' define exit verb (not required)
End Sub

Private Sub Profile_Click()
J.Do "11!:0 :: ] 'psel minijx;pclose'"  ' close any minijx window
J.Do "0!:0 < 1!:45 ''"                  ' load profile
J.Show 1                                ' show and log
J.Log 1
End Sub

Private Sub Run_Click()
' example of reading and writing the alphabet
Dim res As Variant
J.Do "J=: a."
J.Get "J", res
J.Set "abc", res
J.Do "a. -: abc"

End Sub

Private Sub ShowJ_Click()
' load minimal ijx window
J.Do "0!:0 <(_11 }. 1!:45''),'system\extras\util\minijx.ijs'"
J.Log 1
End Sub
