Mọi người cho em hỏi làm sao để em lấy được link ảnh đổ vào textbox trong sự kiện TextChanged được, textbox em để chố độ Enabled=false.
dưới đây là đoạn code load ảnh của em vào pictureBox:
private void btnMoAnh_Click(object sender, EventArgs e)
{
OpenFileDialog dlgOpen = new OpenFileDialog();
dlgOpen.Filter = "Bitmap( *.bmp)|* .bmp|Gif( *.gif) |* .gif|Allfiles( *.* ) | *.* ";
dlgOpen.InitialDirectory = “D:\ảnh\save”;
dlgOpen.FilterIndex = 2;
dlgOpen.Title = “Chọn ảnh để hiển thị”;
if (dlgOpen.ShowDialog() == System.Windows.Forms.DialogResult.OK)
pictureBox1.Image = Image.FromFile(dlgOpen.FileName);
else
MessageBox.Show(“You clicked Cancel”, “Open Dialog”,
MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show(pictureBox1.ImageLocation);
}