common sub to make different Form full screen

mozaharul

Active Member
Licensed User
Hi,

I have 50 different Forms. Some with sequential name like Form1,Form2 and some like Form1a,Form1b. Is it possible to use a common sub to make all 50 Forms full screen using a common sub program ? like :

Sub x_show ()
flb.New1("x",B4PObject(1))
If cPPC Then
flb.FullScreen2(False,True)
End If
End Sub

The click event of a button will assign Form name to x (x=Form1) and pass to the sub.

regards,
 
Last edited:

klaus

Expert
Licensed User
Your subroutine should look like this
B4X:
Sub x_show (x)
  If cPPC Then
    flb.New1("x",B4PObject(1))
    flb.FullScreen2(False,True)
  End If 
End Sub
and the call routine
B4X:
x_show("Form1")
Best regards.
 
Top