protected void UpdateNote() { if (_globalMethods.CheckIfTargetPlatformIsSupported(true)) { if (_globalMethods.GetIsTargetPlatformSupported()) { GlobalNativeMethods.SendMessage(Handle, BCM_SETNOTE, IntPtr.Zero, _note); } } }
/// <summary> /// Updates the cue text. /// </summary> private void UpdateCueText() { if (IsHandleCreated && _globalMethods.CheckIfTargetPlatformIsSupported(true)) { if (_globalMethods.GetIsTargetPlatformSupported()) { GlobalNativeMethods.SendMessage(Handle, EM_SETCUEBANNER, (RetainCueText && _globalMethods.GetIsTargetPlatformSupported()) ? new IntPtr(1) : IntPtr.Zero, CueText); } } }
/// <summary> /// Initialises a new instance of the <see cref="KryptonUACElevatedButton"/> class. /// </summary> public KryptonUACElevatedButton() : base() { Size = new Size((int)(Width * 1.5), Height + 1); _globalMethods.CheckIfTargetPlatformIsSupported(true); if (_globalMethods.GetIsTargetPlatformSupported()) { if (!_isSystemAbleToLoadShield.HasValue || _isSystemAbleToLoadShield.Value) { try { var _icon = IconExtractor.LoadIcon(IconExtractor.IconType.SHIELD, SystemInformation.SmallIconSize); if (_icon != null) { Values.Image = _icon.ToBitmap(); //this.TextImageRelation = TextImageRelation.ImageBeforeText; //Values.Image.ImageAlign = ContentAlignment.MiddleCenter; _isSystemAbleToLoadShield = true; return; } else { _isSystemAbleToLoadShield = false; } } catch (Exception exc) { MessageBox.Show($"Your platform is unsupported. Please contact the software vendor for details.\nFor reference, your system is running: { _globalMethods.GetOSFriendlyName() }.\nException message: { exc.Message }.", "Unsupported Software", MessageBoxButtons.OK, MessageBoxIcon.Error); _isSystemAbleToLoadShield = false; } } //FlatStyle = FlatStyle.System; GlobalNativeMethods.SendMessage(Handle, BCM_SETSHIELD, IntPtr.Zero, new IntPtr(1)); } }