Public Sub MinimizeForm(Frm As Form)
Dim jForm As JavaObject = Frm
Dim stage As JavaObject = jForm.GetField("stage")
stage.RunMethod("setIconified", Array As Object(True))
End Sub
Esempio:
Private Sub Button1_Click
MinimizeForm(B4XPages.GetNativeParent(Me).As(Form))
End Sub
Public Sub MaximizeForm(Frm As Form)
Dim jForm As JavaObject = Frm
Dim stage As JavaObject = jForm.GetField("stage")
stage.RunMethod("setFullScreen", Array As Object(True))
End Sub
e poi:
B4X:
Private Sub Button1_Click
MaximizeForm(B4XPages.GetNativeParent(Me).As(Form))
End Sub