A AndyUK Member Licensed User Nov 19, 2018 #1 Hi I have a project with 2 screens, the main one and a settings screen. I am receiving the data via Bluetooth and can display the value on the main screen but cannot find how to ‘read’ the data from the main screen (where I don’twant to view the data). I have Dim the variables on both screens and added a text label to the target setting screen but it blank. If for testing I assign a value to the value it all works fine. Main:- SubProcess_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. Dimlbl_tap_count AsLabel Dimtap_countAsInt DimstrTapCount AsString SubGlobals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Dimlbl_tap_count AsLabel Dimtap_countAsInt DimstrTapCount AsString Settings:- SubGlobals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. DimstrTapCount AsString Dimlbl_tapCountText AsLabel ' text above data Dimlbl_tap_count AsLabel
Hi I have a project with 2 screens, the main one and a settings screen. I am receiving the data via Bluetooth and can display the value on the main screen but cannot find how to ‘read’ the data from the main screen (where I don’twant to view the data). I have Dim the variables on both screens and added a text label to the target setting screen but it blank. If for testing I assign a value to the value it all works fine. Main:- SubProcess_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. Dimlbl_tap_count AsLabel Dimtap_countAsInt DimstrTapCount AsString SubGlobals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Dimlbl_tap_count AsLabel Dimtap_countAsInt DimstrTapCount AsString Settings:- SubGlobals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. DimstrTapCount AsString Dimlbl_tapCountText AsLabel ' text above data Dimlbl_tap_count AsLabel
Geezer Active Member Licensed User Longtime User Nov 19, 2018 #2 Just dim them on the main screen. Example On main: Code: Copy Sub Process_Globals Dim SomeVariable as string End Sub Then just access it like this from your settings screen. Code: Copy YourLabel.Text = Main.SomeVariable Upvote 0
Just dim them on the main screen. Example On main: Code: Copy Sub Process_Globals Dim SomeVariable as string End Sub Then just access it like this from your settings screen. Code: Copy YourLabel.Text = Main.SomeVariable
A AndyUK Member Licensed User Nov 20, 2018 #3 Geezer said: Just dim them on the main screen. Example On main: Code: Copy Sub Process_Globals Dim SomeVariable as string End Sub Then just access it like this from your settings screen. Code: Copy YourLabel.Text = Main.SomeVariable Click to expand... Thank you so much Geezer, now working perfectly. I spent days trying to get this to work and the answer was 'Main.' Andrew Upvote 0
Geezer said: Just dim them on the main screen. Example On main: Code: Copy Sub Process_Globals Dim SomeVariable as string End Sub Then just access it like this from your settings screen. Code: Copy YourLabel.Text = Main.SomeVariable Click to expand... Thank you so much Geezer, now working perfectly. I spent days trying to get this to work and the answer was 'Main.' Andrew