/// <summary> /// Creates an instance of the Zeroit drop down button /// </summary> /// <param name="startLocation">Sets the start location</param> public ZeroitButtonDropDown(Point startLocation) { InitializeComponent(); //Set the style-------------------------------------- //Remove title bar and set edge-style this.Text = string.Empty; this.FormBorderStyle = FormBorderStyle.None; BackColor = Color.Snow; //Disable normal window functions this.MinimizeBox = false; this.MaximizeBox = false; this.ControlBox = false; this.ShowInTaskbar = false; this.TopMost = true; //make it appear on the very top //---------------------------------------------------- this.Capture = true; //allows mouse events to be triggered no matter where the mouse clicks //Match the position to the parent control this.Left = startLocation.X; this.Top = startLocation.Y; ButtonAnimator animate = new ButtonAnimator(); animate.Target = this; animate.AnimationType = ButtonAnimator.GetAnimationType.TopAnchoredHeightEffect; animate.EasingType = ButtonAnimator.EasingFunctionTypes.BounceEaseOut; animate.Duration = 500; animate.ValueToReach = 120; animate.Activate(); }