Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Don Higgins
  Where is Don Higgins?
 Peoria
 Illinois - United States
 Don Higgins
 To: George Kelly
  Where is George Kelly?
 Dromore
 United Kingdom
 George Kelly
 Tags
Subject: RE: maximizing my applications main screen
Thread ID: 110937 Message ID: 115437 # Views: 3 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Thursday, December 7, 2006 11:20:46 PM         
   


>
> Another lesson learned! Thanks for the tips, Ken. I shall look at using PRIVATE variables as suggested elsewhere in this thread.
> I can well imagine the nightmare if public variables were redefined in code.
>
> George


NO! I used to be the king of public variables until Marcia kicked me really hard and told me to stop it. Private variables are no better. The ONE and ONLY way to properly use your preferences is open your preferences table and extract the information to a form property. I now have 1 public variable which is if my application is in EXE mode or development mode.

For your example:

if used("MyPreferences")
select MyPrefernces
thisform.FontControl = addtofont
else
use Tables\MyPreferences
thisform.FontControl = addtofont
endif




Andy has a better way to open the tables with a class but this code will work for the most part.

YES you will need to change some of your code, takes a few minutes to replace that nasty public variable with a form property but you will thank us in the end. Instead of ADDTOFONT in your code replace it with ThisForm.FontControl or Thisform.AddToFont, your choice what you call it.


Don Higgins








ENTIRE THREAD

maximizing my applications main screen Posted by Jahangir Khan @ 10/24/2006 10:41:17 AM
RE: maximizing my applications main screen Posted by Kiran Kumar Singh @ 10/24/2006 10:57:45 AM
RE: maximizing my applications main screen Posted by Saeed Afshari @ 10/24/2006 10:58:31 AM
RE: maximizing my applications main screen Posted by Borislav Borissov @ 10/24/2006 10:58:32 AM
RE: maximizing my applications main screen Posted by Dave Crozier @ 10/24/2006 10:59:29 AM
RE: maximizing my applications main screen Posted by Marcia Akins @ 10/24/2006 12:19:34 PM
RE: maximizing my applications main screen Posted by George Kelly @ 11/15/2006 10:53:09 AM
RE: maximizing my applications main screen Posted by Marcia Akins @ 12/6/2006 11:55:15 PM
RE: maximizing my applications main screen Posted by George Kelly @ 12/7/2006 10:52:23 AM
RE: maximizing my applications main screen Posted by Marcia Akins @ 12/7/2006 12:40:34 PM
RE: maximizing my applications main screen Posted by George Kelly @ 12/7/2006 1:08:03 PM
RE: maximizing my applications main screen Posted by Ken Murphy @ 12/7/2006 1:44:55 PM
RE: maximizing my applications main screen Posted by tushar @ 12/7/2006 3:26:59 PM
RE: maximizing my applications main screen Posted by Ken Murphy @ 12/7/2006 3:31:52 PM
RE: maximizing my applications main screen Posted by George Kelly @ 12/7/2006 4:51:26 PM
RE: maximizing my applications main screen Posted by Ken Murphy @ 12/7/2006 6:07:40 PM
RE: maximizing my applications main screen Posted by George Kelly @ 12/7/2006 9:23:25 PM
RE: maximizing my applications main screen Posted by Don Higgins @ 12/7/2006 11:20:46 PM
RE: maximizing my applications main screen Posted by George Kelly @ 12/8/2006 11:21:35 AM
RE: maximizing my applications main screen Posted by Ken Murphy @ 12/7/2006 3:29:56 PM
RE: maximizing my applications main screen Posted by Don Higgins @ 12/7/2006 11:22:33 PM
RE: maximizing my applications main screen Posted by George Kelly @ 12/6/2006 1:14:45 PM
RE: maximizing my applications main screen Posted by Barbara Peisch @ 10/24/2006 10:16:51 PM
RE: maximizing my applications main screen Posted by Mike Gagnon @ 10/25/2006 11:43:05 AM