Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
if Assigned(Object) then
DoSomethingWith(Object)
so in your case:
if Assigned(Form2) then
if Form2.Visible then
...