阅读背景:

C#从PictureBox保存图像

来源:互联网 

i have a code like this:

我有这样的代码:

private void Load_Button_Click(object sender, EventArgs e)
    {
        OpenFileDialog dialog = new OpenFileDialog();            
        if (dialog.ShowDialog()==DialogResult.OK){
            MessageBox.Show(dialog.FileName,"My Application", MessageBoxButtons.OK,MessageBoxIcon.Asterisk);
            string s; 
            s=".bmp";
            if (dialog.FileName.Substring(dialog.FileName.LastIndexOf('.')).Equals(s))
            {
                picBox_1.Load(dialog.FileName);
                BitmapFile = new Bitmap(dialog.FileName.ToString());
            }
            else {
                MessageBox.Show("Not a BMP file!");
            }
        }

    }
private v



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: