Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bob Brook
  Where is Bob Brook?
 Surrey
 United Kingdom
 Bob Brook
 To: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 Tags
Subject: RE: Totals at bottom of Grids
Thread ID: 396043 Message ID: 396099 # Views: 47 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Grids
Date: Wednesday, January 22, 2014 8:41:16 PM         
   


> > I have recently added Peter Sass's grid totals grid to forms in my applications.
> > They work(ed) fine and I set the default height of the totgrid to 20px and would increase it to the height of the rows in the main grid plus twice the line height.
> >
> > On XP and some Windows 7 OS PC's this works without problem.
> >
> > Yesterday, received error messages numbered 2005 from a client using Windows 7.
> >
> > On investigation it turns out that the minimum height I was using of 20 was causing the error. If I set the totgrid classes height to 40 and in the SetPosition method use a Do Loop and a Try Catch EndTry structure on setting the totgrid height for an actual form with an incrementing variable to slowly increase the grids height. It overcomes the problem.
> >
> > On my XP system if I try to set a grid height of less than 20 under VFP - it gives an error.
> > This is the 2005 error that the end user gets when running the program.
> >
> > I suppose my question is: why for some operating systems, what is in their environment that could cause a 2005 error on some PC's but not on others. It may also be a problem for some Windows 8 PC's but as yet none have reported an error.
> >
> > I suspected the style/type of Window display being used, but on changing to Windows Classic or Windows XP under the Control Panel, has no effect on the error.
> >
> >
> > Regards
> >
> > Bob of Surrey, England
>
>
> Hi Bob,
>
> I am very unclear of what you mean by setting the default height of the totgrid?
> Since I am running a Windows 7 Pro 64-bit system and changing the heights on objects all the time and
> I cannot seem to duplicate your issue, then . . .
> I think you may need to zip up an example form with some sample data in it so someone can download
> and duplicate the issue and see if the root cause can be found.
>
> Tried also on a Windows 8 system this morning and changing height from 20 to 40 and back to 20, still no
> errors??
>
> Pete "the IceMan", from the Great White North of Canada.
> www.marathongriffincomputers.com


"...by setting the default height of the totgrid."

I mean, setting the height property within the totgrid class (based upon the standard grid class) to a value which is the same as the grids RowHeight with a HeaderHeight of 0 with that class. I set it to that value, so that on the form design window it approximates to the size it will appear as under the running program.



The point is, I cannot duplicate the issue, for under VFP9 SP2 when I try to set the Height property to say, 10px, VFP gives an error and does not accept the change. It is only by making the class a table and changing the height property, before changing it back into a class, can I force a 2005 error from the compiled program.

Most OS/PC's do NOT produce the error, so far I've only had it occur on 1 Windows 7 system.
Several other Windows 7 systems do not produce the error. I am just wondering what could be different on this PC which makes it fail.

Regards

Bob of Surrey, England

ENTIRE THREAD

Totals at bottom of Grids Posted by Bob Brook @ 1/22/2014 2:14:53 PM
RE: Totals at bottom of Grids Posted by Stefan Wuebbe @ 1/22/2014 3:00:58 PM
RE: Totals at bottom of Grids Posted by Bob Brook @ 1/22/2014 4:34:42 PM
RE: Totals at bottom of Grids Posted by Pete Sass @ 1/22/2014 7:21:34 PM
RE: Totals at bottom of Grids Posted by Bob Brook @ 1/22/2014 8:41:16 PM
RE: Totals at bottom of Grids Posted by Pete Sass @ 1/22/2014 9:37:49 PM
RE: Totals at bottom of Grids Posted by Bob Brook @ 1/23/2014 11:22:21 AM
RE: Totals at bottom of Grids Posted by Vicos Vicos @ 1/24/2014 10:59:09 PM
RE: Totals at bottom of Grids Posted by Ilyas Ansar @ 1/24/2014 2:36:16 AM
RE: Totals at bottom of Grids Posted by Bob Brook @ 1/24/2014 11:24:20 AM
RE: Totals at bottom of Grids Posted by Bob Brook @ 1/24/2014 1:10:24 PM