void RestrictedProcessNcActivate() { Debug.Assert(IsRestrictedWindow, "This should only be called for restricted windows"); // Ignore if tearing down... // if (IsDisposed || Disposing) { return; } // Note that this.Handle does not get called when the handle hasn't been created yet (See VSWhidbey 264275 & 264291) // SecurityToolTip secTip = (SecurityToolTip)Properties.GetObject(PropSecurityTip); if (secTip == null) { if (IsHandleCreated && UnsafeNativeMethods.GetForegroundWindow() == this.Handle) { secTip = new SecurityToolTip(this); Properties.SetObject(PropSecurityTip, secTip); } } else if (!IsHandleCreated || UnsafeNativeMethods.GetForegroundWindow() != this.Handle) { secTip.Pop(false /*noLongerFirst*/); } else { secTip.Show(); } }
internal ToolTipNativeWindow(SecurityToolTip control) { this.control = control; }
private void RestrictedProcessNcActivate() { if (!base.IsDisposed && !base.Disposing) { SecurityToolTip tip = (SecurityToolTip) base.Properties.GetObject(PropSecurityTip); if (tip == null) { if (base.IsHandleCreated && (System.Windows.Forms.UnsafeNativeMethods.GetForegroundWindow() == base.Handle)) { tip = new SecurityToolTip(this); base.Properties.SetObject(PropSecurityTip, tip); } } else if (!base.IsHandleCreated || (System.Windows.Forms.UnsafeNativeMethods.GetForegroundWindow() != base.Handle)) { tip.Pop(false); } else { tip.Show(); } } }