Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void DisplayScreens()
- {
- Panel p;
- int w = 0, h = 0, i = 0, offset;
- //Debug.WriteLine(Screen.AllScreens.Length);
- Width = 350;
- foreach (Screen s in Screen.AllScreens)
- {
- offset = i*10;
- //Debug.WriteLine((s.Bounds.Width / 10) + offset);
- p = new Panel
- {
- Location = new Point((s.Bounds.X / 10) + offset + (screenArea.Width / 2), (s.Bounds.Y / 10)),
- Name = "panel",
- Size = new Size((s.Bounds.Width / 10), (s.Bounds.Height / 10)),
- TabIndex = 0,
- BackColor = Color.Black,
- BorderStyle = BorderStyle.Fixed3D,
- };
- Width += (p.Size.Width + 10);
- screenArea.Size = new Size(Width - 350, screenArea.Size.Height);
- //Debug.WriteLine(p.Size);
- //Debug.WriteLine(p.Location);
- screenArea.Controls.Add(p);
- panels.Add(p);
- i++;
- }
- //Height = h;
- //Width = w;
- }
Advertisement
Add Comment
Please, Sign In to add comment