상속: System.Windows.Forms.Form
예제 #1
0
        private void ShowList()
        {
            if (ListOpening != null)
            {
                ListOpening.Invoke(this, null);
            }
            isOpened            = true;
            topForm             = new TpTopMostForm();
            topForm.Deactivate += (sender, args) => HideList();
            int   a = topForm.Height;
            int   b = Screen.PrimaryScreen.Bounds.Height;
            Point c = PointToScreen(new Point(0, Height));

            topForm.Controls.Add(_innerList);

            _innerList.Location = new Point(0, 0);
            bool t = _innerList.Focus();

            topForm.Size = _innerList.Size;

            if (PointToScreen(new Point(0, Height)).Y + topForm.Height > Screen.PrimaryScreen.Bounds.Height)
            {
                topForm.Location = PointToScreen(new Point(0, -topForm.Height));
            }
            else
            {
                topForm.Location = PointToScreen(new Point(0, Height));
            }

            mouseHook.SetHook();
            topForm.ShowDialog();
        }
예제 #2
0
 private void HideList()
 {
     mouseHook.RemoveHook();
     isOpened = false;
     if (topForm != null)
     {
         topForm.Close();
         topForm = null;
     }
 }
예제 #3
0
		private void ShowList()
		{
			if (ListOpening != null)
				ListOpening.Invoke(this, null);
			isOpened = true;
			topForm = new TpTopMostForm();
			topForm.Deactivate += (sender, args) => HideList();
			int a = topForm.Height;
			int b = Screen.PrimaryScreen.Bounds.Height;
			Point c = PointToScreen(new Point(0, Height));
			topForm.Controls.Add(_innerList);

			_innerList.Location = new Point(0, 0);
			bool t = _innerList.Focus();
			topForm.Size = _innerList.Size;

			if (PointToScreen(new Point(0, Height)).Y + topForm.Height > Screen.PrimaryScreen.Bounds.Height)
				topForm.Location = PointToScreen(new Point(0, -topForm.Height));
			else
				topForm.Location = PointToScreen(new Point(0, Height));

			mouseHook.SetHook();
			topForm.ShowDialog();
		}		
예제 #4
0
		private void HideList()
		{
			mouseHook.RemoveHook();
			isOpened = false;
			if (topForm != null)
			{
				topForm.Close();
				topForm = null;
			}
		}