Sub Globals
'Declare the global variables here.
jump = -10
End Sub
Sub App_Start
AddForm("Form1", "Form1")
AddPanel("Form1", "Panel1", 0, Form1.Height, Form1.Width, 100)
AddTimer("Timer1")
panel1.color = cRed
AddButton("Form1", "B2", 0, 0, 50, 50)
form1.text = panel1.top
timer1.interval = 10
AddButton("Panel1", "B1", 90, 20, 50, 50)
Form1.Show
End Sub
Sub Timer1_Tick
panel1.top = panel1.top + jump
form1.text = panel1.top
If panel1.top + panel1.height <= form1.height Then
panel1.top = form1.height - panel1.height
timer1.enabled = False
End If
End Sub
Sub b2_Click
timer1.enabled = True
End Sub
Sub B1_Click
AppClose
End Sub
Except in http://www.b4x.com/forum/additional-libraries/4820-formexdevice-library.html#post27830Forms are always full size.
I tried it but I removed it as it caused several problems, including the app hanging, if the user used a Task Manager to switch to another task and then back. I think that MessageBox, which is modal, on the device is cleverer than it looks and does some things deep in the system to avoid these hangs and to draw itself. For example it's not obvious how it draws the wireframe when it moves, I tried to emulate that but cannot see a way to do it at the momentBut the Modal mode is not supported on the device.