Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make a form that covers the whole desktop 1

Status
Not open for further replies.

beedubau

Programmer
Jan 7, 2003
97
AU
IrfanView slideshow completely covers everything on the desktop irrespective of the desktop's resolution.

How can I do this for my slideshow in VFP9?

IOW I want a form larger than the form size of my app.

Thanks

Bryan
 
Bryan,

Make it a top-level form. Then set the following properties in its Init:

thisform.Height = SYSMETRIC(2)
thisform.Width = SYSMETRIC(1)
thisform.Top = 0
thisform.Left = 0
thisform.TitleBar = 0

Make sure you've got some way of closing or restoring the form before you run it.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Mike
Thanks for that.

I was using
Code:
DECLARE INTEGER GetSystemMetrics IN Win32API INTEGER
#DEFINE SM_CXVIRTUALSCREEN 78   && Virtual Width
#DEFINE SM_CYVIRTUALSCREEN 79   && Virtual Height
lnWidth  = GetSystemMetrics(SM_CXVIRTUALSCREEN)
lnHeight = GetSystemMetrics(SM_CYVIRTUALSCREEN)

_SCREEN .HEIGHT = lnHeight 
_SCREEN .WIDTH = lnWidth

I found in addition to your code I needed to redefine the _SCREEN as well.

Regards

bryan


 
Bryan,

I believe the difference between VFP's SysMetric() and the GetSystemMetrics() API call with SM_CXVIRTUALSCREEN and SM_CYVIRTUALSCREEN is that the former gives you the size of the physical screen. The latter takes account of the taskbar.

I have always used SystemParametersInfo() to get the size of the screen minus the taskbar. I'm not sure if that's the same as GetSystemMetrics.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top