示例#1
0
        /// <summary>
        /// Updates the placement of the Control.
        /// </summary>
        protected void UpdatePlacement()
        {
            if (_source != null)
            {
                HandlerNativeMethods.SetParent(_source.Handle, _parentHandle);

                HandlerNativeMethods.SetWindowPos(_source.Handle, new IntPtr((int)SetWindowPositionInsertAfter.Top),
                                                  0, 0, Math.Abs(_bounds.Left - _bounds.Right), Math.Abs(_bounds.Top - _bounds.Bottom), SetWindowPositionOptions.ShowWindow);
            }
        }
 /// <inheritdoc />
 protected override void SetParentHandle(IntPtr handle)
 {
     HandlerNativeMethods.SetParent(Control.Handle, handle);
 }