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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BUILDING KIOSKS

Status
Not open for further replies.

TrueCode

MIS
Joined
Sep 30, 2003
Messages
71
Location
LC
I am working on an App which involves a Kiosk for public interaction with a Touch Screen Monitor. I have been able to hide the windows taskbar. However, when I open the first form in Maximimzed mode it does not cover the taskbar area. So I end up with a blank bar where the Taskbar used to be. How do I programmatically fill the screen with the form. And, secondly, how do I disable the Windows Key.

Your help is being sought since I have exhausted help that I know of.
 
Ramani,

I tried it and it did not work. The space left by the invisible Taskbar is still obvious














Your help is being sought since I have exhausted help that I know of.
 
I agree with ramani, this code does work in the forms Init():
Code:
ThisForm.Width = SYSMETRIC(1)
ThisForm.Height = SYSMETRIC(2)
In the command window what values do you see for these?
Code:
ThisForm.Width = SYSMETRIC(1)
ThisForm.Height = SYSMETRIC(2)
Are you using a framework or resizing control that overrides this?

Are you using a video driver that artificially changes the desktop size vs. the video resolution?

Rick
 
Symetric(1) = 1024
symetric(2) = 768

These coincide with my video Resolution.


Are you using a framework or resizing control that overrides this?


Not familiar with this terms.

"I have sought your assistance on this matter because I have exhausted all the help that I can find. You are free to direct me to other source of help"
 
Well that's a mystery, because if you set the form height and width to the video resolution values, and there isn't anything to change that or any error messages, then I guess only by tracing through the code in the debugger will you learn where it's "going wrong".

A framework can simply be a set of classes that you consistently use to simplify your coding, it could be the code generated by the Application builder/generator that comes with VFP or a commercial one like MaxFrame, ProMatrix, FoxExpress, etc. (See for a comparison chart.)

Many people like to use a resizing class that will change the position and size of the components on a form when the user resizes the form. These can override code that you write.

Rick
 
Rick,

While the form does not fill the screen by the code Rick and you suggested, when I double click on the Title Bar of the form it fills the screen!

Would that help?





TrueCode

"I have sought your assistance on this matter because I have exhausted all the help that I can find. You are free to direct me to other source of help"
 
Clicking on the title bar of the form is the same as clicking on the Maximize button (next to the X - Close). If that's "good enough', then try setting:
Code:
ThisForm.WindowState = 2 && Maximized
Again this would go into the form's INIT() method.

Rick
 
rgbean

My form has all of the suggested code in it. Also it has no parent class, I mean User Defined. I first hide the windows taskbar, then run the form, It does not fill the screen. Only when I dbl click on the title bar, it fills the screen. The Form is a Top Level Form.

"I have sought your assistance on this matter because I have exhausted all the help that I can find. You are free to direct me to other source of help"
 
You haven't mentioned what Version and Service Pack level of VFP you using. I just tried a simple app in VFP 7.0 SP 1 and VFP 8.0 that has a top-level form, and both:
Code:
ThisForm.WindowState = 2 && Maximized
and:
Code:
ThisForm.Autocenter = .F.
ThisForm.Width = SYSMETRIC(1)
ThisForm.Height = SYSMETRIC(2)
ThisForm.Autocenter = .T.
seem to work. I'm using XP Pro SP1.

Rick
 
I am using vfp7 sp1 and XP Pro. And I am not getting through. Probably is my code for hiding that taskbar?

Take a look.


Code:
  DECLARE LONG FindWindow IN "user32" STRING lpClassName, STRING lpWindowName
    DECLARE LONG SetWindowPos IN "user32" LONG hWnd, LONG hWndInsertAfter, LONG x, LONG Y, LONG cx, LONG cy, LONG wFlags
    #DEFINE WINDOWHIDE 0x80
    #DEFINE WINDOWSHOW 0x40
    LOCAL lnHandle
    lnHandle = FindWindow("Shell_TrayWnd", "")
    SetWindowPos(lnHandle, 0, 0, 0, 0, 0, WINDOWHIDE)

"I have sought your assistance on this matter because I have exhausted all the help that I can find. You are free to direct me to other source of help"
 
TrueCode

I was able to run a form "full screen", by using the autohide, rather than just hiding the taskbar. So set the autohide to .T., still hide the taskbar and run your form and see if that helps. Here is the code that I used (except I don't control the autohide with VFP, it manually set).
Code:
PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
	Height = 742
	Width = 375
	ShowWindow = 2
	DoCreate = .T.
	AutoCenter = .T.
	Caption = "Form1"
	WindowType = 1
	WindowState = 2
	AlwaysOnTop = .T.
	Name = "Form1"
	PROCEDURE Load
		application.Visible = .f.
		Declare Long FindWindow In "user32" String lpClassName, String lpWindowName
		Declare Long SetWindowPos In "user32" Long HWnd, Long hWndInsertAfter, Long x, Long Y, Long cx, Long cy, Long wFlags
		#Define WINDOWHIDE 0x80
		#Define WINDOWSHOW 0x40
		Local lnHandle
		lnHandle = FindWindow("Shell_TrayWnd", "")
		SetWindowPos(lnHandle, 0, 0, 0, 0, 0, WINDOWHIDE)
	ENDPROC
ENDDEFINE

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike,

It worked but if I could get VFP to do the autohide=.t. it would be good. I was going through the windows API for such a function at no avail. By the way Mike, Where can I find an exhaustive list of the values for the CONSTANTS that are referred to in the Windows API Functions?


"I have sought your assistance on this matter because I have exhausted all the help that I can find. You are free to direct me to other source of help"
 
Hi Shift the code and put it in the ActivateEvent of the form..

myForm.ACtivate Event
*********************
DECLARE LONG FindWindow IN "user32" STRING lpClassName, STRING lpWindowName
DECLARE LONG SetWindowPos IN "user32" LONG hWnd, LONG hWndInsertAfter, LONG x, LONG Y, LONG cx, LONG cy, LONG wFlags
#DEFINE WINDOWHIDE 0x80
#DEFINE WINDOWSHOW 0x40
LOCAL lnHandle
lnHandle = FindWindow("Shell_TrayWnd", "")
SetWindowPos(lnHandle, 0, 0, 0, 0, 0, WINDOWHIDE)
_screen.Visible = .f.
This.Height = SYSMETRIC(2)
This.Width = SYSMETRIC(1)

This works for me. :-)

ramani :-)
(Subramanian.G)
 
Ramani

My nightmare is over. It work!!

I does fill the screen. But I wished that I could see a little more of my taskbar

"I have sought your assistance on this matter because I have exhausted all the help that I can find. You are free to direct me to other source of help"
 
Guys thanks alot.

Please ignore my last post and forgive for all the trouble. I was able to see more of the taskbar by using

This.Height = SYSMETRIC(2)-20

instead of

This.Height = SYSMETRIC(2)


Thanks again.

"I have sought your assistance on this matter because I have exhausted all the help that I can find. You are free to direct me to other source of help"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top