Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Nadeem Shah
  Where is Nadeem Shah?
 Rawalpindi
 Pakistan
 Nadeem Shah
 To: Marcia Akins
  Where is Marcia Akins?
 Akorn
 Ohio - United States
 Marcia Akins
 Tags
Subject: RE: _Screen.Property
Thread ID: 143128 Message ID: 143210 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Sunday, August 26, 2007 4:32:33 AM         
   


> I am still confused ragarding .AddProperty() or Custom Class in Main.Prg. Should be greatfull if you send adn example to add property or custom class.
>
>
> **************************************************
> *-- Class:        stdenv
> *-- ParentClass:  custom
> Define Class stdenv As cusbase
>   *-- Original setting of SET SYSFORMATS
>   csysformats = ""
>   cansi = ""
>   ccentury = ""
>   cconfirm = ""
>   cdeleted = ""
>   cexact = ""
>   cexclusive = ""
>   nfdow = 0
>   cfullpath = ""
>   nmemowidth = 0
>   cnotify = ""
>   cnull = ""
>   csafety = ""
>   nreprocess = 0
>   cstatus = ""
>   cstatusbar = ""
>   nstrictdate = 0
>   ctalk = ""
>   cescape = ""
>   *-- Original setting of set('date')
>   cdate = ""
>   cseparator = ""
>   cpoint = ""
>   *-- Original Setting of Set TextMerge
>   ctextmerge = ""
>   *-- Setting of set spdialog
>   ccpdialog = ""
>   Name = "stdenv"
> 
> 
>   *-- Sets up the form environment
>   Procedure Set
>     Local loINIMgr, lcDate, lcSeparator
> 
>     Set Talk Off
>     If Vartype( 'oApp.oInimgr'  ) = 'O' And Not Isnull( oApp.oInimgr ) And File( 'AppSystem' )
>       *** Check System .INI file for regional settings of date and for numerics
>       lcDate = loINIMgr.GetValue( "REGIONAL SETTINGS", 'DATE', "AppSystem" )
>       lcPoint = loINIMgr.GetValue( "REGIONAL SETTINGS", 'POINT', "AppSystem" )
>       lcSeparator = loINIMgr.GetValue( "REGIONAL SETTINGS", 'SEPARATOR', "AppSystem" )
>     Else
>       lcDate = Set( 'DATE' )
>       lcPoint = Set( 'POINT' )
>       lcSeparator = Set( 'SEPARATOR' )
>     Endif
> 
>     *** Set the environment
>     *** If we running an executable, there is no need to save settings
>     If Version( 2 ) # 0
>       Set Escape On
>       Set Asserts On
>       This.SaveSettings()
>     Else
>       Set Escape Off
>       Set Asserts Off
>       Set Status Bar Off
>     Endif
>     Set Sysformats Off
>     Set Resource Off
>     Set Date To &lcDate
>     Set Decimals To 4  && NEEDED TO DISPLAY CURRENCY CORRECTLY IN NUMERIC TEXT BOX
>     Set Century On ROLLOVER 60
>     Set Point To '&lcPoint'
>     Set Separator To '&lcSeparator'
>     Set Ansi Off
>     Set Confirm On
>     Set Deleted On
>     Set Exact Off
>     Set Exclusive Off
>     Set Multilocks On
>     *** Is the first day of the week Monday? For a business, I would think so.
>     Set Fdow To 2
>     Set Fullpath On
>     Set Memowidth To 50
>     Set Notify Off
>     Set Null Off
>     Set NullDisplay To ' '
>     Set Reprocess To 10 Seconds
>     Set Safety Off
>     Set Status Off
>     Set StrictDate To 0
>     Set Textmerge On
>     Set Cpdialog Off
>   Endproc
> 
> 
>   *-- Resets the environment the way it was
>   Procedure Reset
>     *** Restore the original environment
>     *** Can't just use the vfp default settings because these are developers
>     *** who may get upset if you change their customized settings
>     Local lcSetting
>     With This
>       lcSetting = .cdate
>       Set Date To &lcSetting
>       lcSetting = .ccentury
>       Set Century &lcSetting
>       lcSetting = .csysformats
>       Set Sysformats &lcSetting
>       lcSetting = .cansi
>       Set Ansi &lcSetting
>       lcSetting = .cconfirm
>       Set Confirm &lcSetting
>       lcSetting = .cdeleted
>       Set Deleted &lcSetting
>       lcSetting = .cexact
>       Set Exact &lcSetting
>       lcSetting = .cexclusive
>       Set Exclusive &lcSetting
>       *** Is the first day of the week Monday? For a business, I would think so.
>       Set Fdow To .nfdow
>       lcSetting = .cfullpath
>       Set Fullpath &lcSetting
>       Set Memowidth To .nmemowidth
>       lcSetting = .cnotify
>       Set Notify &lcSetting
>       lcSetting = .cnull
>       Set Null &lcSetting
>       Set NullDisplay To
>       lcSetting = .cpoint
>       Set Point To '&lcSetting'
>       Set Reprocess To .nreprocess
>       lcSetting = .csafety
>       Set Safety &lcSetting
>       lcSetting = .cseparator
>       Set Separator To '&lcSetting '
>       lcSetting = .cstatus
>       Set Status &lcSetting
>       lcSetting = .cstatusbar
>       Set Status Bar  &lcSetting
>       Set StrictDate To .nstrictdate
>       lcSetting = .ctextmerge
>       Set Textmerge &lcSetting
>       lcSetting = .ctalk
>       Set Talk  &lcSetting
>       lcSetting = .ccpdialog
>       Set Talk  &lcSetting
>     Endwith
>   Endproc
> 
> 
>   Procedure SaveSettings
>     With This
>       .ccentury     = Set( 'CENTURY' )
>       .csysformats = Set( 'SYSFORMATS' )
>       .cansi       = Set( 'ANSI' )
>       .cconfirm    = Set( 'CONFIRM' )
>       .cdate       = Set( 'DATE' )
>       .cdeleted    = Set( 'DELETED' )
>       .cexact      = Set( 'EXACT' )
>       .cexclusive  = Set( 'EXCLUSIVE' )
>       .nfdow       = Set( 'FDOW' )
>       .cfullpath   = Set( 'FULLPATH' )
>       .nmemowidth  = Set( 'MEMOWIDTH' )
>       .cnotify     = Set( 'NOTIFY' )
>       .cnull       = Set( 'NULL' )
>       .cpoint      = Set( 'POINT' )
>       .nreprocess  = Set( 'REPROCESS' )
>       .csafety     = Set( 'SAFETY' )
>       .cseparator  = Set( 'SEPARATOR' )
>       .cstatus     = Set( 'STATUS' )
>       .cstatusbar  = Set( 'STATUS BAR' )
>       .nstrictdate = Set( 'STRICTDATE' )
>       .ctalk       = Set ( 'TALK' )
>       .cescape     = Set( 'ESCAPE' )
>       .ctextmerge  = Set( 'TEXTMERGE' )
>       .ccpdialog = Set( "Cpdialog" )
>     Endwith
>   Endproc
> 
> 
>   Procedure Init
>     This.Set()
>   Endproc
> 
> 
>   Procedure Destroy
>     If Version( 2 ) # 0
>       This.Reset()
>     Endif
>   Endproc
> Enddefine
> 

>
> Regards,
> Marcia G. Akins
> Tightline Computers, Inc.



Marcia

Nice job done. My rating for you. Later i shall try this code.

One question more, how and where we shall start this code. Sorry i am new in classes.
Nadeem Iqbal

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