OverviewExamples
table System.GetDisplayInfo ( |
) |
screen_info = System.GetDisplayInfo();
Gets the screen width, height and color depth of the user's system and stores the information in a table called "screen_info." This information can be accessed by referencing screen_info.Width, screen_info.Height and screen_info.ColorDepth. If the user's resolution was set to 800 x 600, screen_info.Width would contain the value 800 and screen_info.Height would contain 600. It's color depth may be a value such as 32.
-- Get the user's display information.
display = System.GetDisplayInfo();
if (display ~= nil) then
-- If the user's running less than 800 x 600, display a dialog.
if (display.Height < 600) then
Dialog.Message("Notice", "Your resolution is currently set to "..display.Width.." x "..display.Height..".\r\n"..
"You must have at least 800 x 600 to view this application properly.", MB_OK, MB_ICONINFORMATION);
end
end
Gets the user's screen resolution and stores it in a table called "display." If the user has a resolution that is less than 800 x 600, a dialog is displayed notifying them of the application requirement.
See also: Related Actions