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: [email protected] [mailto:[email protected]] On Behalf Of [email protected] 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" <[email protected]> To: "ProFox Email List" <[email protected]> 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: [email protected] 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/289ea162f5642645b5cf64d624c66a140e260...@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.

