#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
' wherever you put the jar file
#AdditionalJar: c:\temp\OnScreenKeyboard.jar
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim kb As JavaObject
Dim tf As TextField
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
tf.Initialize("tf")
MainForm.RootPane.AddNode(tf,10,10,200,20)
MainForm.Show
' create instance of the keyboard
kb.InitializeNewInstance("com.codeforwin.projects.onscreenkeyboard.KeyboardUI",Null)
' show the keyboard
kb.RunMethod("setVisible",Array(True))
'Clicking on virtual keyboard will type into the textfield or whatever control has focus
' hide keyboard
'kb.RunMethod("setVisible",array(false))
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub