B4J Question how check form is displaying ??

behnam_tr

Member
hello

i want to check formshowing is true or false before show form
how can i check that form is showing or hiding ??

form.showing method cant return any value before form.show run

actually i want to prevent show if is show before

thanks
 

DonManfred

Expert
Licensed User
form1.Visible?

Away from that form1. Showing is giving the same answer!?

B4X:
    Log("Before show: Visible="&MainForm.Visible) ' False
    Log("Before show: Showing="&MainForm.Showing) ' False
    MainForm.Show
    Log("After show: Visible="&MainForm.Visible) ' True
    Log("After show: Showing="&MainForm.Showing) ' True
 
Last edited:

behnam_tr

Member
when loging form2.showing from mainform i cant get any answer when form2 is hidden ,why ??
thank with form2.visible solved my problem and returned (true or false)
 

behnam_tr

Member
form1.Visible?

Away from that form1. Showing is giving the same answer!?

B4X:
    Log("Before show: Visible="&MainForm.Visible) ' False
    Log("Before show: Showing="&MainForm.Showing) ' False
    MainForm.Show
    Log("After show: Visible="&MainForm.Visible) ' True
    Log("After show: Showing="&MainForm.Showing) ' True
how check like this for other forms before start them??

Log("Before start: Visible="&form2.form2frm.Visible) ' Error
Log("Before start: Showing="&form2.form2frm.Visible) ' Error

form2.start
Log("After start: Visible="&form2.form2frm.Visible) ' True
Log("After start: Showing="&form2.form2frm.Visible.Showing) ' True

form2.form2frm.close
Log("after close: Visible="&form2.form2frm.Visible) ' false
Log("after close: Showing="&form2.form2frm.Visible) ' false


i want to check before start form its possible ??
 
Top