AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.SetFormStyle("UNIFIED")
MainForm.RootPane.LoadLayout("1") 'Load the layout file.
MainForm.Show
Dim clientId As String = Rnd(0, 999999999) & DateTime.Now 'create a unique id
Dim mo As MqttConnectOptions
mo.Initialize(user, password)' set in Process_Globals
Dim jo As JavaObject = mo
'jo.RunMethod("SetSSLProperties",?)' how to set 'TLS' true ???
mqtt.Initialize("mqtt", "mqtt.gbridge.io:8883", clientId)
mqtt.Connect2(mo)
mytopic = "gBridge/xxxx/xxxx/onoff" & mqtt.ClientId
StatusBar1.Initialize("StatusBar1")
MainForm.RootPane.AddNode(StatusBar1, 0, 0, -1, 30)
MainForm.RootPane.SetAnchors(StatusBar1, 0, -1, 0, 0)
End Sub