Ejemplo n.º 1
0
        public void DestoryTransForm()
        {
            if (MyBasicTransForm != null)
            {
                MyBasicTransForm.destroyForm();
            }

            if (MyLayerTransForm != null)
            {
                MyLayerTransForm.destroyForm();
            }

            if (MyOverTransForm != null)
            {
                MyOverTransForm.destroyForm();
            }

            MyBasicTransForm = null;
            MyLayerTransForm = null;
            MyOverTransForm  = null;
        }
Ejemplo n.º 2
0
        public void MakeOverTransForm(bool isTranslateFormTopMostFlag, bool isProcessTransFlag)
        {
            if (MyOverTransForm == null)
            {
                MyOverTransForm = new TransFormOver();

                MyOverTransForm.Name          = "TransFormOver";
                MyOverTransForm.StartPosition = FormStartPosition.Manual;

                //-----------v2

                var screens = Screen.AllScreens;


                Rectangle rect = new Rectangle();
                foreach (var obj in screens)
                {
                    rect = Rectangle.Union(rect, obj.Bounds);
                }
                MyOverTransForm.Location = new Point(rect.X, rect.Y);
                MyOverTransForm.Size     = new Size(rect.Width, rect.Height);

                int x = Screen.PrimaryScreen.Bounds.X - rect.X;
                int y = Screen.PrimaryScreen.Bounds.Y - rect.Y;
                MyOverTransForm.SetAdjustPosition(x, y);

                //--------------------


                //-----------v1
                //MyOverTransForm.Location = new Point(0, 0);
                //MyOverTransForm.Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
                //------------------

                MyOverTransForm.setTopMostFlag(true);

                MyOverTransForm.UpdateTransform();
                MyOverTransForm.HideTaksBar();
                MyOverTransForm.Show();

                Util.ShowLog("Make over");
            }
            else
            {
                MyOverTransForm.setTopMostFlag(true);
                MyOverTransForm.Activate();

                MyOverTransForm.UpdateTransform();
                MyOverTransForm.Show();
            }



            Util.ShowLog("Make over???????");

            if (isProcessTransFlag == false)
            {
                MyOverTransForm.setOverHitLayer();
                MyOverTransForm.setVisibleBackground();
            }
            else
            {
                MyOverTransForm.setOverHitLayer();
                MyOverTransForm.setInvisibleBackground();
            }
        }