SetAsLCDForegroundApp() private method

private SetAsLCDForegroundApp ( int device, bool foregroundYesNoFlag ) : ReturnValue
device int
foregroundYesNoFlag bool
return ReturnValue
Ejemplo n.º 1
0
        public void SetAsLCDForegroundApp(bool yesNo)
        {
            if (!Opened)
            {
                throw new Exception("Not opened.");
            }
            var error = LgLcd.SetAsLCDForegroundApp(Handle, yesNo);

            if (error != LgLcd.ReturnValue.ErrorSuccess)
            {
                if (error == LgLcd.ReturnValue.ErrorLockFailed)
                {
                    throw new Exception("The operation could not be completed.");
                }
                throw new Win32Exception((int)error);
            }
        }