Oct 28, 2009 #1 pierrotsc Programmer Joined Nov 25, 2007 Messages 358 Location US I am trying to find out if i can tell if a form is opened. I tried if palettef.showing then, if palettef.enabled then , if palettef.active then But i get an error if the palettef form is not opened. Anybosy got an idea? Thanks. Pierrotsc
I am trying to find out if i can tell if a form is opened. I tried if palettef.showing then, if palettef.enabled then , if palettef.active then But i get an error if the palettef form is not opened. Anybosy got an idea? Thanks. Pierrotsc
Oct 28, 2009 1 #2 DelphiAaron Programmer Joined Jul 4, 2002 Messages 826 Location AU check if form is created: if form2 = nil then do something... check if form is visible: if form2.visible then do something... Aaron Upvote 0 Downvote
check if form is created: if form2 = nil then do something... check if form is visible: if form2.visible then do something... Aaron
Oct 28, 2009 Thread starter #3 pierrotsc Programmer Joined Nov 25, 2007 Messages 358 Location US Thanks man. I was missing the nil...I did change it to if form2<>nil to find out if it was created. PO Upvote 0 Downvote
Thanks man. I was missing the nil...I did change it to if form2<>nil to find out if it was created. PO
Oct 29, 2009 1 #4 whosrdaddy Vendor Joined Mar 11, 2003 Messages 4,231 Location BE Standard check if you work with on the fly objects: Code: if Assigned(Object) then DoSomethingWith(Object) so in your case: if Assigned(Form2) then if Form2.Visible then ... /Daddy ----------------------------------------------------- What You See Is What You Get Never underestimate tha powah of tha google! Upvote 0 Downvote
Standard check if you work with on the fly objects: Code: if Assigned(Object) then DoSomethingWith(Object) so in your case: if Assigned(Form2) then if Form2.Visible then ... /Daddy ----------------------------------------------------- What You See Is What You Get Never underestimate tha powah of tha google!
Oct 29, 2009 Thread starter #5 pierrotsc Programmer Joined Nov 25, 2007 Messages 358 Location US Thanks. I learned something new...I just updated my code. Upvote 0 Downvote