I wrote a B4J program for receiving customer orders from external smartphones
A single form in which the received orders appear and the activity performed by the program itself
The program works correctly
A new icon is initialized in the tray bar when it is started, some entries have been added to impart the basic commands, and then the main form is hidden
This is the code
After verifying that the operation is correct, I inserted a new line in the Windows 'scheduled tasks' to start the procedure automatically when the PC starts
Everything works correctly, in the sense that even after starting the PC, without logging in as a Windows user, the procedure for receiving orders is running and does its job of receiving orders from outside and printing them as soon as they are received
But if I log in as a Windows user, I can't see the icon in the tray bar that allows me to view the form
The question is: by starting the procedure for receiving orders using the 'scheduled tasks' of Windows, when the PC starts up, how can I view the form when I log in as a Windows user?
A single form in which the received orders appear and the activity performed by the program itself
The program works correctly
A new icon is initialized in the tray bar when it is started, some entries have been added to impart the basic commands, and then the main form is hidden
This is the code
B4X:
tray.Initialize
Dim MenuItems() As String = Array As String("View", "Hide","Configuration", "-", "Exit")
icon1.Initialize("icon1", WSConnected, MenuItems)
icon1.ToolTip = "WEB SOCKET RECEIVER - DoubleClick to View. RightClick Menu."
tray.AddTrayIcon(icon1)
Dim stage As JavaObject = MainForm
stage.GetFieldJO("stage").RunMethod("setIconified", Array(True))
Dim mf As JavaObject = MainForm.RootPane
mf.RunMethodJO("getScene",Null).RunMethodJO("getWindow",Null).RunMethod("hide",Null)
After verifying that the operation is correct, I inserted a new line in the Windows 'scheduled tasks' to start the procedure automatically when the PC starts
Everything works correctly, in the sense that even after starting the PC, without logging in as a Windows user, the procedure for receiving orders is running and does its job of receiving orders from outside and printing them as soon as they are received
But if I log in as a Windows user, I can't see the icon in the tray bar that allows me to view the form
The question is: by starting the procedure for receiving orders using the 'scheduled tasks' of Windows, when the PC starts up, how can I view the form when I log in as a Windows user?