Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Andy Kramek
  Where is Andy Kramek?
 Hot Springs Village
 Arkansas - United States
 Andy Kramek
 To: Ahsan Rana
  Where is Ahsan Rana?
 Lahore
 Pakistan
 Ahsan Rana
 Tags
Subject: RE: _Screen.Property
Thread ID: 143128 Message ID: 143162 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Saturday, August 25, 2007 12:57:15 PM         
   


> Hi Experts
>
> Is it possible to save any public variable in _Screen to use any wahere in App. If Yes then How...

Yes, there are two ways of doing it:

[1] Use the AddProperty() method of the _Screen object to add single properties or arrays:
_Screen.AddProperty( 'PropX', 'Initial Value' )
_Screen.AddProperty( 'ArrayX[3,3]', .F. )

However, not all objects have an addproperty() method, in which case you can use the alternate:

[2] Use the ADDPROPERTY() fucntion, introduced in VFP 8.0, to enable adding properties to any object:
ADDPROPERTY( _Screen, 'PropY', 'Initialized To This' )

Note that if the property already re-declaring it (either way) will not cause an error - though any value in that property will be overwritten by whatever the new declaration defines (or the default [.F.] if nothing is specified).

Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA

ENTIRE THREAD

_Screen.Property Posted by Ahsan Rana @ 8/25/2007 5:58:06 AM
RE: _Screen.Property Posted by Bernard Bout @ 8/25/2007 7:14:52 AM
RE: _Screen.Property Posted by Tariq mehmood @ 8/25/2007 12:17:41 PM
RE: _Screen.Property Posted by Cetin Basoz @ 8/25/2007 12:47:48 PM
RE: _Screen.Property Posted by Andy Kramek @ 8/25/2007 12:57:15 PM
RE: _Screen.Property Posted by Ken Murphy @ 8/25/2007 2:11:03 PM
RE: _Screen.Property Posted by Ahsan Rana @ 8/25/2007 7:49:51 PM
RE: _Screen.Property Posted by Marcia Akins @ 8/25/2007 9:15:57 PM
RE: _Screen.Property Posted by Syed Nadeem Iqbal @ 8/26/2007 4:32:33 AM
RE: _Screen.Property Posted by Ken Murphy @ 8/26/2007 2:50:34 PM
RE: _Screen.Property Posted by Benny Thomas @ 8/26/2007 3:37:53 PM
RE: _Screen.Property Posted by Ken Murphy @ 8/26/2007 3:48:51 PM
RE: _Screen.Property Posted by Syed Nadeem Iqbal @ 8/26/2007 7:24:18 PM
RE: _Screen.Property Posted by Marcia Akins @ 8/27/2007 4:19:27 PM
RE: _Screen.Property Posted by Benny Thomas @ 8/26/2007 8:34:50 AM
RE: _Screen.Property Posted by Ken Murphy @ 8/26/2007 2:26:07 PM
RE: _Screen.Property Posted by Marcia Akins @ 8/27/2007 4:22:38 PM
RE: _Screen.Property Posted by Benny Thomas @ 8/26/2007 10:01:16 AM
RE: _Screen.Property Posted by Ken Murphy @ 8/26/2007 2:53:52 PM
RE: _Screen.Property Posted by Marcia Akins @ 8/27/2007 4:24:06 PM
RE: _Screen.Property Posted by Ken Murphy @ 8/27/2007 5:15:36 PM
RE: _Screen.Property Posted by Benny Thomas @ 8/28/2007 8:33:23 AM