首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

c# 创建的pictruebox PictureBoxSizeMode.StretchImage 无效,求大神帮忙,

2013-12-10 
c# 创建的pictrueboxPictureBoxSizeMode.StretchImage 无效,求大神帮忙,在线等~~p1 new PictureBox()p1

c# 创建的pictruebox PictureBoxSizeMode.StretchImage 无效,求大神帮忙,在线等~~
p1 = new PictureBox(); 
          
            p1.Refresh();
        
          //  p1.MouseClick += new EventHandler(p1_Rigth_click);
             
            this.Controls.Add(p1); 
            p1.SizeMode = PictureBoxSizeMode.StretchImage;()
            p1.BackgroundImage = Properties.Resources._11222;
            p1.Refresh();
            p1.Width = 100;
            p1.Height = 100;
            isDragging = true;  //可以拖动
            currentX = e.X;
            currentY = e.Y;
            p1.Click += new EventHandler(p1_click);
     p1.SizeMode = PictureBoxSizeMode.StretchImage;() 没改变图片的大小?
因为图片本身大小为 128*128 怎样才能让图片完全显示,控件的大小最大我只能给他100*100
 
[解决办法]
p1.BackgroundImageLayout = ImageLayout.Stretch;

热点排行