Mobile运行时改变Picturebox的image属性

   public static  string programPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
       
        private void button1_Click(object sender, EventArgs e)
        {
            string filename = programPath + @"\未命名.jpg";
          
            Bitmap bmp = new Bitmap(filename);

 

            this.pictureBox1.Image = System.Drawing.Image.FromHbitmap(bmp.GetHbitmap());
        }

你可能感兴趣的:(mobile)