Giusy Active Member Licensed User Jul 16, 2018 #1 hi, I want to create the first page of my program (title and nice image) I have create a layout Activity.LoadLayout("presentation") and then a sleep routine (3 seconds) Sub WaitFor(Milliseconds As Int) Dim Present As Long Present = DateTime.Now Do While DateTime.Now < Present + Milliseconds Loop End Sub But the program wait 3 seconds and after the page appear and disappear how can I do? Thanks
hi, I want to create the first page of my program (title and nice image) I have create a layout Activity.LoadLayout("presentation") and then a sleep routine (3 seconds) Sub WaitFor(Milliseconds As Int) Dim Present As Long Present = DateTime.Now Do While DateTime.Now < Present + Milliseconds Loop End Sub But the program wait 3 seconds and after the page appear and disappear how can I do? Thanks
udg Expert Licensed User Longtime User Jul 16, 2018 #2 Search for "splashscreen" or "splash screen". There are a few alternatives or you could code one yourself. Upvote 0
Search for "splashscreen" or "splash screen". There are a few alternatives or you could code one yourself.
Peter Simpson Expert Licensed User Longtime User Jul 16, 2018 #3 Search the forum for 'splash screen', there are a few examples including one from RandonCoder and also one from Erel, there are others too... Upvote 0
Search the forum for 'splash screen', there are a few examples including one from RandonCoder and also one from Erel, there are others too...
Yayou49 Active Member Licensed User Jul 17, 2018 #5 You can also use a timer as follow: B4X: Sub Process_Globals Private T1 As Timer End Sub Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("Layout1") T1.Initialize("T1",3000) T1.Enabled = True End Sub Sub T1_tick StartActivity("News") End Sub Upvote 0
You can also use a timer as follow: B4X: Sub Process_Globals Private T1 As Timer End Sub Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("Layout1") T1.Initialize("T1",3000) T1.Enabled = True End Sub Sub T1_tick StartActivity("News") End Sub
Erel B4X founder Staff member Licensed User Longtime User Jul 18, 2018 #6 Why use a timer (which is initialized incorrectly and never disabled)? B4X: Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("Layout1") Sleep(3000) StartActivity(News) End Sub Upvote 0
Why use a timer (which is initialized incorrectly and never disabled)? B4X: Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("Layout1") Sleep(3000) StartActivity(News) End Sub