C# 控件调整

            //最大化
this.WindowState = FormWindowState.Maximized;
//去掉标题栏
this.FormBorderStyle = FormBorderStyle.None; //设置picbox
this.pictureBox1.Width = this.Width;
this.pictureBox1.Height = this.Height;
this.pictureBox1.Left = ;
this.pictureBox1.Top = ;
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;//设置背景图像布局
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill; //随着父级一起改变
this.pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;//自适应
  //最大化
this.WindowState = FormWindowState.Maximized;
////去掉标题栏
//this.FormBorderStyle = FormBorderStyle.None; //设置picbox
this.axWindowsMediaPlayer1.Width = this.Width;
this.axWindowsMediaPlayer1.Height = this.Height;
this.axWindowsMediaPlayer1.Left = ;
this.axWindowsMediaPlayer1.Top = ;
this.axWindowsMediaPlayer1.Dock = System.Windows.Forms.DockStyle.Fill; //随着父级一起改变
上一篇:linux笔记_20150825_linux有什么好处


下一篇:[C++程序设计]有默认参数的函数