Derek
09-22-2005, 06:26 PM
To automatically resize your project to the same size as the user's screen size, add the following lines of code to the project's "On Startup" event:
-- Get the user's screen size
screen_info = System.GetDisplayInfo();
-- set the application size to same as screen size
Window.SetSize(Application.GetWndHandle(this), screen_info.Width, screen_info.Height-10);
-- position application window to top left
Window.SetPos(Application.GetWndHandle(this), 0, 0);
You can also choose to enable 'Flat' style in the Project settings instead of 'Standard' thus effectively giving you kiosk mode without the border.
Additionally, simply subtract '10' from the height to show the taskbar:
Window.SetSize(Application.GetWndHandle(this), screen_info.Width, screen_info.Height-10);
-- Get the user's screen size
screen_info = System.GetDisplayInfo();
-- set the application size to same as screen size
Window.SetSize(Application.GetWndHandle(this), screen_info.Width, screen_info.Height-10);
-- position application window to top left
Window.SetPos(Application.GetWndHandle(this), 0, 0);
You can also choose to enable 'Flat' style in the Project settings instead of 'Standard' thus effectively giving you kiosk mode without the border.
Additionally, simply subtract '10' from the height to show the taskbar:
Window.SetSize(Application.GetWndHandle(this), screen_info.Width, screen_info.Height-10);