Example #1
0
        private void box_MouseEnter(object sender, EventArgs e)
        {
            Random rand = new Random();

            Pictures luke = new Pictures(Screen.PrimaryScreen.Bounds.Bottom + 425, rand.Next(Screen.PrimaryScreen.Bounds.Left, Screen.PrimaryScreen.Bounds.Right - 360), true);

            this.Controls.Add(luke.pictureBox());

            box = new PictureBox();
            box = luke.pictureBox();
            box.MouseEnter +=box_MouseEnter;
        }
Example #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Random rand = new Random();

            this.Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);

            Pictures luke = new Pictures(Screen.PrimaryScreen.Bounds.Bottom + 425, rand.Next(Screen.PrimaryScreen.Bounds.Left, Screen.PrimaryScreen.Bounds.Right - 360), false);

            this.Controls.Add(luke.pictureBox());

            box = new PictureBox();
            box = luke.pictureBox();
            box.MouseEnter +=box_MouseEnter;
        }