コード例 #1
0
        public void Highlight()
        {
            lock (this.formLock)
            {
                this.Opacity = 0.8D;
            }

            //this.BringToFront();
            //this.TopMost = true;
            this.Show();
            WindowInfoWithHandle.SetWindowForground(this.Handle);

            for (int i = 20; i >= 0; i--)
            {
                //フォームの不透明度を変更する
                lock (this.formLock)
                {
                    this.Opacity = 0.05 * i;
                }
                //一時停止
                System.Threading.Thread.Sleep(1);
                //await Task.Delay(30);
            }

            this.Hide();
            this.Close();
        }
コード例 #2
0
        /**
         * <summary>
         * コンテキストメニューを表示する
         * </summary>
         */
        public void ShowContextMenu()
        {
            var monitorInfo = this.monitorManager.GetCurrentMonitor();

            System.Drawing.Point p = new System.Drawing.Point();
            p.X = monitorInfo.monitorRect.left + 100;
            p.Y = monitorInfo.monitorRect.top + 100;

            this.contextMenuStrip1.Show(p);
            WindowInfoWithHandle.SetWindowForground(this.contextMenuStrip1.Handle);
            //this.contextMenuStrip1.Focus();
        }