private void button2_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "图片文件 |*.jpg;*.png"; ofd.ValidateNames = true; ofd.CheckPathExists = true; ofd.CheckFileExists = true; if (ofd.ShowDialog() == DialogResult.OK) { string FileName = ofd.FileName; weChatThread.Wx_SendImg(txt_msgWxid.Text, FileName); } }