Exemple #1
0
 public Composer(Main mainForm)
 {
     this.mainForm = mainForm;
     InitializeComponent();
     composedTextBox.KeyDown += composedTextBox_KeyDown;
     setComposerInvert();
 }
Exemple #2
0
        public RubberBand(Main mainform)
        {
            this.mainform = mainform;
            InitializeComponent();
            this.TopMost = true;
            this.Opacity = .30;
            this.TransparencyKey = System.Drawing.Color.White;
            this.Location = new Point(0, 0);
            DoubleBuffered = true;
            pen = new Pen(System.Drawing.Color.DarkRed, 3);
            pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;

            int maxX = 0;
            int maxY = 0;

            foreach (Screen screen in System.Windows.Forms.Screen.AllScreens)
            {
                int x = screen.Bounds.X + screen.Bounds.Width;
                if (x > maxX)
                    maxX = x;
                int y = screen.Bounds.Y + screen.Bounds.Height;
                if (y > maxY)
                    maxY = y;

            }
            bounds.X = 0;
            bounds.Y = 0;
            bounds.Width = maxX;
            bounds.Height = maxY;

            this.Size = new Size(bounds.Width, bounds.Height);
        }