Silme94
Silme94
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
No description
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
ok
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
nah not the issue
private void PageImage_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
isDrawing = false;

//MemoryStream ms = new MemoryStream();
pageImage.Image?.Dispose();
drawingBitmap.Save("C:\\test.png"); //pageImage.ImageLocation);


}
}
private void PageImage_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
isDrawing = false;

//MemoryStream ms = new MemoryStream();
pageImage.Image?.Dispose();
drawingBitmap.Save("C:\\test.png"); //pageImage.ImageLocation);


}
}
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
@Nasdack do you see anything wrong ?
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
this is full code, read the class constructor and the end of the code
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
i dont see nothing wrong
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
but i think its bc of the errors u know
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
the lines are not drawing
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
when i move the cursor its not drawingbut when i up the mouse it says the error
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
and its not even drawing anything in the two case
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
same error
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
?
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
im not using "using"
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
already tried
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
ive found this idk this ay workshttps://www.youtube.com/watch?v=bp9PzpGZsWA
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
i dont think so cause im setting the with with ImageLocation
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
when it tries to save the image
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
private void PageImage_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
isDrawing = true;
pos.X = e.X;
pos.Y = e.Y;
}
}

private void PageImage_MouseDrawMove(object sender, MouseEventArgs e)
{
if (isDrawing)
{
g.DrawLine(drawingPen, pos, e.Location);

pos = e.Location;

pageImage.Invalidate();
}
}

private void PageImage_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
isDrawing = false;

drawingBitmap.Save(pageImage.ImageLocation);
}
}
private void PageImage_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
isDrawing = true;
pos.X = e.X;
pos.Y = e.Y;
}
}

private void PageImage_MouseDrawMove(object sender, MouseEventArgs e)
{
if (isDrawing)
{
g.DrawLine(drawingPen, pos, e.Location);

pos = e.Location;

pageImage.Invalidate();
}
}

private void PageImage_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
isDrawing = false;

drawingBitmap.Save(pageImage.ImageLocation);
}
}
81 replies
CC#
Created by Silme94 on 11/19/2024 in #help
Windows Forms drawing not saving
@Nasdack "A generic error occurred in GDI+" when the mouseUp event if fired :
drawingBitmap = new Bitmap(pageImage.ImageLocation);
//g = pageImage.CreateGraphics();
g = Graphics.FromImage(drawingBitmap);
pageImage.Image = drawingBitmap;
drawingBitmap = new Bitmap(pageImage.ImageLocation);
//g = pageImage.CreateGraphics();
g = Graphics.FromImage(drawingBitmap);
pageImage.Image = drawingBitmap;
81 replies