Ted Sullivan
09-17-2004, 02:12 PM
Function: IsRunningOnTabletPC
Last Revision: September 17, 2004 (001)
Information
This function can be used to determine if the host operating system is running Window XP Tablet PC Edition.
To use this function in your Setup Factory 7.0 projects, simply copy and paste it into your Global Functions. You can get there by selecting Resources > Global Functions from the main menu.
function IsRunningOnTabletPC()
local strRet = DLL.CallFunction(_SystemFolder.."\\user32.dll","GetSystemMetrics",86,DLL_RETURN_TYPE_INTEGER,DLL_CALL_STDCALL);
local nLastError = Application.GetLastError();
if(nLastError == 0) then
if(strRet ~= "0") then
return true;
end
end
return false;
end
To call the function from your project, try copying and pasting the following script onto an action tab, such as the On Startup event. You can get there by choosing Project > Actions.
if (IsRunningOnTabletPC()) then
Dialog.Message("Status","This system is running Windows XP Tablet PC Edition");
else
Dialog.Message("Status","This system is NOT running Windows XP Tablet PC Edition");
end
Function Name: IsRunningOnTabletPC
Type: Setup Factory 7.0 Function
Created By: Brett Kapilik
Comments? Please post them here.
Last Revision: September 17, 2004 (001)
Information
This function can be used to determine if the host operating system is running Window XP Tablet PC Edition.
To use this function in your Setup Factory 7.0 projects, simply copy and paste it into your Global Functions. You can get there by selecting Resources > Global Functions from the main menu.
function IsRunningOnTabletPC()
local strRet = DLL.CallFunction(_SystemFolder.."\\user32.dll","GetSystemMetrics",86,DLL_RETURN_TYPE_INTEGER,DLL_CALL_STDCALL);
local nLastError = Application.GetLastError();
if(nLastError == 0) then
if(strRet ~= "0") then
return true;
end
end
return false;
end
To call the function from your project, try copying and pasting the following script onto an action tab, such as the On Startup event. You can get there by choosing Project > Actions.
if (IsRunningOnTabletPC()) then
Dialog.Message("Status","This system is running Windows XP Tablet PC Edition");
else
Dialog.Message("Status","This system is NOT running Windows XP Tablet PC Edition");
end
Function Name: IsRunningOnTabletPC
Type: Setup Factory 7.0 Function
Created By: Brett Kapilik
Comments? Please post them here.