0
ビットマップイメージをテキストファイルから保存できるようにするため、テキストファイルとビットマップファイルを開いて後で表示することができます。これは、ビットマップイメージを保存するための私の現在のコードです:C#のテキストボックスからテキスト付きのビットマップを保存する
{
//Show a save dialog to allow the user to specify where to save the image file
using (SaveFileDialog dlgSave = new SaveFileDialog())
{
dlgSave.Title = "Save Image";
dlgSave.Filter = "Bitmap Images (*.bmp)|*.bmp|All Files (*.*)|*.*";
if (dlgSave.ShowDialog(this) == DialogResult.OK)
{
//If user clicked OK, then save the image into the specified file
using (Bitmap bmp = new Bitmap(capturebox.Width, capturebox.Height))
{
capturebox.DrawToBitmap(bmp, new Rectangle(0, 0, bmp.Width, bmp.Height));
bmp.Save(dlgSave.FileName);
}
}
}
}
ので、私はそれがExtraNotesと呼ばれるラベルにテキストを保存し、その後のPictureBoxで画像を開くことができるようにする必要があります(capturebox)とのテキストもう一度ラベルを付けます。 、
おかげ