Index
2010-07-19 15:09 – <kamcginnis@gmail.com>: Screen resolution, scroll bars, etc
2010-07-19 17:54 – MB Software Solutions, LLC : Re: Screen resolution, scroll bars, etc
2010-07-19 20:55 – Andrew Stirling : Re: Screen resolution, scroll bars, etc
2010-07-20 02:32 – MB Software Solutions, LLC : Re: Screen resolution, scroll bars, etc
2010-07-20 14:50 – <kamcginnis@gmail.com>: Re: Screen resolution, scroll bars, etc
2012-06-13 15:48 – Kurt Wendt : RE: Screen resolution, scroll bars, etc
2012-06-13 15:54 – Richard Kaye : RE: Screen resolution, scroll bars, etc
2012-06-13 16:00 – Kurt Wendt : RE: Screen resolution, scroll bars, etc
2012-06-13 16:08 – Tracy Pearson : RE: Screen resolution, scroll bars, etc
Back to top
Screen resolution, scroll bars, etc

Author: <kamcginnis@gmail.com>

Posted: 2010-07-19 15:09:33   Link

I have an application that needs 1024 X 768. I need for it to run on laptops that may have less than they resolution. In

fact, the application runs fine on all laptops that I have tried regardless of the resolution, the problem is that the

form is cut off. I need to enable a scroll bar on the right. I set _Screen.MaxButton = .T. and it works fine.

Any ideas?

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/09a801cb2775$ecc71cc0$7a00a8c0@w2k3s02

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 <kamcginnis@gmail.com>
Back to top
Re: Screen resolution, scroll bars, etc

Author: MB Software Solutions, LLC

Posted: 2010-07-19 17:54:25   Link

kamcginnis@gmail.com wrote:

> I have an application that needs 1024 X 768. I need for it to run on laptops that may have less than they resolution. In

> fact, the application runs fine on all laptops that I have tried regardless of the resolution, the problem is that the

> form is cut off. I need to enable a scroll bar on the right. I set _Screen.MaxButton = .T. and it works fine.

>

> Any ideas?

Look into designing your apps for a minimum rsolution, but take full

advantage of the Resize method and Anchor properties. I did this for

some utilities at my last gig (...I'm no longer at Sylvan) and it worked

great.

--

Mike Babcock, MCP

MB Software Solutions, LLC

President, Chief Software Architect

http://mbsoftwaresolutions.com

http://fabmate.com

http://twitter.com/mbabcock16

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/4C44C991.2040904@mbsoftwaresolutions.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 MB Software Solutions, LLC
Back to top
Re: Screen resolution, scroll bars, etc

Author: Andrew Stirling

Posted: 2010-07-19 20:55:56   Link

Mike

I have:

Form Init

this.nborderstyle = 3

this.ScrollBars= 3

*DODEFAULT()

Form Activate

IF this.Height + 100 >_vfp.Height &&-100 < this.Height

this.Top = 3

this.Height = _vfp.Height-110 &&_screen.Height-40

ENDIF

IF this.width + 60 >_vfp.width &&-50 < this.width

this.Left = 3

this.width = _vfp.width-50

ENDIF

This pops up a scroll bar if the form is bigger than the screen

availability.

Obviously best to put this in your default form class.

Andrew Stirling

01250 874580

http://www.calcpay.co.uk

HMRC Accredited UK payroll program

On 19/07/2010 22:54, MB Software Solutions, LLC wrote:

> kamcginnis@gmail.com wrote:

>> I have an application that needs 1024 X 768. I need for it to run on laptops that may have less than they resolution. In

>> fact, the application runs fine on all laptops that I have tried regardless of the resolution, the problem is that the

>> form is cut off. I need to enable a scroll bar on the right. I set _Screen.MaxButton = .T. and it works fine.

>>

>> Any ideas?

>

>

> Look into designing your apps for a minimum rsolution, but take full

> advantage of the Resize method and Anchor properties. I did this for

> some utilities at my last gig (...I'm no longer at Sylvan) and it worked

> great.

>

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/4C44F41C.3010505@calcpay.co.uk

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 Andrew Stirling
Back to top
Re: Screen resolution, scroll bars, etc

Author: MB Software Solutions, LLC

Posted: 2010-07-20 02:32:18   Link

Andrew Stirling wrote:

> Mike

> I have:

> Form Init

> this.nborderstyle = 3

> this.ScrollBars= 3

> *DODEFAULT()

>

> Form Activate

> IF this.Height + 100 >_vfp.Height &&-100 < this.Height

> this.Top = 3

> this.Height = _vfp.Height-110 &&_screen.Height-40

> ENDIF

> IF this.width + 60 >_vfp.width &&-50 < this.width

> this.Left = 3

> this.width = _vfp.width-50

> ENDIF

>

> This pops up a scroll bar if the form is bigger than the screen

> availability.

> Obviously best to put this in your default form class.

Cool. I never designed scrolling forms; heard via here years ago that I

thought they were problematic, so I avoided them.

--

Mike Babcock, MCP

MB Software Solutions, LLC

President, Chief Software Architect

http://mbsoftwaresolutions.com

http://fabmate.com

http://twitter.com/mbabcock16

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/4C4542F2.4040302@mbsoftwaresolutions.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 MB Software Solutions, LLC
Back to top
Re: Screen resolution, scroll bars, etc

Author: <kamcginnis@gmail.com>

Posted: 2010-07-20 14:50:24   Link

Thanks for the ideas. Here is what I ended up doing (a combination of ideas received)

use the API to get the user's screen resolution: (this is well documented if you use google)

goapp.nScreenHeight

goapp.nScreenWidth

Then put this in your form class init:

********************* resolution new code *********************

Local ;

llVertical, ;

llHorizontal

If This.Height > (goapp.nScreenHeight - 42)

llVertical = .T.

Endif

If This.Width > (goapp.nScreenWidth - 42)

llHorizontal = .T.

Endif

Do Case

Case llVertical And llHorizontal

This.AutoCenter = .F.

This.Height = goapp.nScreenHeight - 42

This.Width = goapp.nScreenWidth - 42

This.Top = 2

This.Left = 2

This.ScrollBars = 3 && both vertical and horizontal

Case llVertical

This.AutoCenter = .F.

This.Height = goapp.nScreenHeight - 42

This.Top = 2

This.Width = This.Width + 8 && to allow for the vertical scroll bar

This.ScrollBars = 2 && vertical

Case llHorizontal

This.AutoCenter = .F.

This.Left = 2

This.Width = goapp.nScreenWidth - 42

This.ScrollBars = 1 && horizontal

Endcase

----- Original Message -----

From: "MB Software Solutions,LLC" <mbsoftwaresolutions@mbsoftwaresolutions.com>

To: "ProFox Email List" <profox@leafe.com>

Sent: Monday, July 19, 2010 11:32 PM

Subject: Re: Screen resolution, scroll bars, etc

Andrew Stirling wrote:

> Mike

> I have:

> Form Init

> this.nborderstyle = 3

> this.ScrollBars= 3

> *DODEFAULT()

>

> Form Activate

> IF this.Height + 100 >_vfp.Height &&-100 < this.Height

> this.Top = 3

> this.Height = _vfp.Height-110 &&_screen.Height-40

> ENDIF

> IF this.width + 60 >_vfp.width &&-50 < this.width

> this.Left = 3

> this.width = _vfp.width-50

> ENDIF

>

> This pops up a scroll bar if the form is bigger than the screen

> availability.

> Obviously best to put this in your default form class.

Cool. I never designed scrolling forms; heard via here years ago that I

thought they were problematic, so I avoided them.

--

Mike Babcock, MCP

MB Software Solutions, LLC

President, Chief Software Architect

http://mbsoftwaresolutions.com

http://fabmate.com

http://twitter.com/mbabcock16

[excessive quoting removed by server]

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/0acc01cb283c$6afaa0f0$7a00a8c0@w2k3s02

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2010 <kamcginnis@gmail.com>
Back to top
RE: Screen resolution, scroll bars, etc

Author: Kurt Wendt

Posted: 2012-06-13 15:48:35   Link

Hey Folks,

I know this is a REALLY OLD Thread - going back to July 2010. But, I was

searching in my archive here to find out how to obtain the current

screen resolution - so I could set a form to full screen (without

knowing what the User currently has their screen resolution set to). It

doing a search on resolution - this is one of the few Threads I found

that had Resolution in the Subject.

I tried doing a search on Google for this GoApp API thing - but, wasn't

sure I was actually finding the right thing! Maybe someone can point me

in the right direction.

Or - better yet - if something if VFP can already tell me the current

screen resolution without using an external API - that would be even

better!

I was also looking around in the online VFP help - but, so far did NOT

find what I needed...

TIA,

-K-

-----Original Message-----

From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com]

On Behalf Of kamcginnis@gmail.com

Sent: Tuesday, July 20, 2010 2:50 PM

Thanks for the ideas. Here is what I ended up doing (a combination of

ideas received)

use the API to get the user's screen resolution: (this is well

documented if you use google)

goapp.nScreenHeight

goapp.nScreenWidth

Then put this in your form class init:

********************* resolution new code *********************

Local ;

llVertical, ;

llHorizontal

If This.Height > (goapp.nScreenHeight - 42)

llVertical = .T.

Endif

If This.Width > (goapp.nScreenWidth - 42)

llHorizontal = .T.

Endif

Do Case

Case llVertical And llHorizontal

This.AutoCenter = .F.

This.Height = goapp.nScreenHeight - 42

This.Width = goapp.nScreenWidth - 42

This.Top = 2

This.Left = 2

This.ScrollBars = 3 && both vertical and horizontal

Case llVertical

This.AutoCenter = .F.

This.Height = goapp.nScreenHeight - 42

This.Top = 2

This.Width = This.Width + 8 && to allow for the vertical scroll

bar

This.ScrollBars = 2 && vertical

Case llHorizontal

This.AutoCenter = .F.

This.Left = 2

This.Width = goapp.nScreenWidth - 42

This.ScrollBars = 1 && horizontal

Endcase

----- Original Message -----

From: "MB Software Solutions,LLC"

<mbsoftwaresolutions@mbsoftwaresolutions.com>

To: "ProFox Email List" <profox@leafe.com>

Sent: Monday, July 19, 2010 11:32 PM

Subject: Re: Screen resolution, scroll bars, etc

Andrew Stirling wrote:

> Mike

> I have:

> Form Init

> this.nborderstyle = 3

> this.ScrollBars= 3

> *DODEFAULT()

>

> Form Activate

> IF this.Height + 100 >_vfp.Height &&-100 < this.Height

> this.Top = 3

> this.Height = _vfp.Height-110 &&_screen.Height-40

> ENDIF

> IF this.width + 60 >_vfp.width &&-50 < this.width

> this.Left = 3

> this.width = _vfp.width-50

> ENDIF

>

> This pops up a scroll bar if the form is bigger than the screen

> availability.

> Obviously best to put this in your default form class.

Cool. I never designed scrolling forms; heard via here years ago that I

thought they were problematic, so I avoided them.

--

Mike Babcock, MCP

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/289EA162F5642645B5CF64D624C66A140E26050F@us-ny-mail-002.waitex.net

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2012 Kurt Wendt
Back to top
RE: Screen resolution, scroll bars, etc

Author: Richard Kaye

Posted: 2012-06-13 15:54:54   Link

Look at SYSMETRIC() in the VFP help.

--

rk

-----Original Message-----

From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com] On Behalf Of Kurt Wendt

Sent: Wednesday, June 13, 2012 4:49 PM

To: profoxtech@leafe.com

Subject: RE: Screen resolution, scroll bars, etc

Hey Folks,

I know this is a REALLY OLD Thread - going back to July 2010. But, I was searching in my archive here to find out how to obtain the current screen resolution - so I could set a form to full screen (without knowing what the User currently has their screen resolution set to). It doing a search on resolution - this is one of the few Threads I found that had Resolution in the Subject.

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/DF1EEF11E586A64FB54A97F22A8BD0441D54882BE0@ACKBWDDQH1.artfact.local

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2012 Richard Kaye
Back to top
RE: Screen resolution, scroll bars, etc

Author: Kurt Wendt

Posted: 2012-06-13 16:00:27   Link

Thanks Richard - that pretty much did it!

-K-

-----Original Message-----

From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On

Behalf Of Richard Kaye

Sent: Wednesday, June 13, 2012 4:55 PM

Look at SYSMETRIC() in the VFP help.

--

rk

-----Original Message-----

From: profoxtech-bounces@leafe.com [mailto:profoxtech-bounces@leafe.com]

On Behalf Of Kurt Wendt

Sent: Wednesday, June 13, 2012 4:49 PM

Hey Folks,

I know this is a REALLY OLD Thread - going back to July 2010. But, I was

searching in my archive here to find out how to obtain the current

screen resolution - so I could set a form to full screen (without

knowing what the User currently has their screen resolution set to). It

doing a search on resolution - this is one of the few Threads I found

that had Resolution in the Subject.

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/289EA162F5642645B5CF64D624C66A140E260510@us-ny-mail-002.waitex.net

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2012 Kurt Wendt
Back to top
RE: Screen resolution, scroll bars, etc

Author: Tracy Pearson

Posted: 2012-06-13 16:08:58   Link

Kurt Wendt wrote on 2012-06-13:

> Thanks Richard - that pretty much did it!

> -K-

>

> -----Original Message-----

> From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On

> Behalf Of Richard Kaye

> Sent: Wednesday, June 13, 2012 4:55 PM

>

> Look at SYSMETRIC() in the VFP help.

>

> --

> rk

Kurt,

If you have multiple monitors, and they are different resolutions, I believe

Sysmetric() will return information from the primary monitor.

It's been a while since I ran different resolutions on my monitors.

Tracy Pearson

PowerChurch Software

_______________________________________________

Post Messages to: ProFox@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/profox

OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech

Searchable Archive: http://leafe.com/archives/search/profox

This message: http://leafe.com/archives/byMID/profox/001901cd49a8$c03059e0$40910da0$@powerchurch.com

** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

©2012 Tracy Pearson