View Full Version : Detect Kiosk Mode
TJ_Tigger
08-12-2005, 02:05 PM
Is there a way to detect if an application is running in Kiosk mode? I have run into a problem where if you are running in kiosk mode and you get the coordinate information for an object on the page and then try to use those coordinates to open a popup menu, the popup menu is then placed on the page and not over the object where you clicked. This is of course when dealing with a project that does not fit the size of the screen.
I figure if I have to I can set a variable that states if the app is running in Kiosk mode and if it is, I can then adjust the coordinates accordingly for the popup to appear where i want it to appear, or even use Worms Mouse.dll to base the coordinates on the mouse position instead of the screen button coordinates.
Tigg
I had the same issue with SetMask. I ended up having to put the offset in manually because I couldn't come up with a bullet proof way of detecting KIOSK over Flat windows. I could narrow it down to those 2 types, but from there I couldn't ever distinguish.
threaded
08-13-2005, 07:55 AM
well, since im not sure about what youre doing, im going to assume some things...1st assumption is that you are using the "detect screen size" functions from the forum here...second that the popup is an object that you can use SetPos and SetSize on. If neither of these are correct, then disregard what I post...
I spent a lot of time to make my project open full screen for different screen res's and took portions of what I read in this forum and created what I believe is a final solution. Feel free to test, but this does away with having more than one project for different sizes, does not require i to be a web browser to adjust size, allows objects to get resized (using coordinates) with the page.
--Page "On Preload"
display = System.GetDisplayInfo();
Window.SetSize(Application.GetWndHandle(), display.Width, display.Height);
Window.SetPos(Application.GetWndHandle(), 0, 0);
Paragraph.SetSize("ApplicationText", 457, 32);
Paragraph.SetPos("ApplicationText", 0, 0);
--Page "On Show"
Window.SetSize(Application.GetWndHandle(), display.Width, display.Height);
Paragraph.SetPos("ApplicationText", 0, 0);
threaded
08-14-2005, 11:07 AM
I guess I was wrong in my assumptions.
TJ_Tigger
08-14-2005, 11:13 AM
The popup is from www.icynorth.com and when you build the popup menu you have to specify the coordinates where you want the popup to appear. Normally I use the coordinates of the button pushed to make the popup appear just below the button. However when in Kiosk mode when you set the coordinates for the popup it sets it to the screen position and not the project position which maybe smaller than screen.
What I have done is detect if the project res is larger than the original size. If this is the case then I do some quick math to adjust the coordinates so it appears in the correct location.
Tigg
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.