Click here to Skip to main content
15,878,970 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionCustom Control Visual Basic .Net Pin
JM768-Feb-14 2:01
JM768-Feb-14 2:01 
AnswerRe: Custom Control Visual Basic .Net Pin
Dave Kreskowiak8-Feb-14 2:54
mveDave Kreskowiak8-Feb-14 2:54 
GeneralRe: Custom Control Visual Basic .Net Pin
JM768-Feb-14 3:04
JM768-Feb-14 3:04 
QuestionToolstrip Pin
KirtiZare7-Feb-14 22:42
KirtiZare7-Feb-14 22:42 
AnswerRe: Toolstrip Pin
Dave Kreskowiak8-Feb-14 2:51
mveDave Kreskowiak8-Feb-14 2:51 
Questionnot able to save image which is already saved with same name and to the same location Pin
ven7537-Feb-14 18:05
ven7537-Feb-14 18:05 
AnswerRe: not able to save image which is already saved with same name and to the same location Pin
TnTinMn7-Feb-14 18:37
TnTinMn7-Feb-14 18:37 
GeneralRe: not able to save image which is already saved with same name and to the same location Pin
ven7537-Feb-14 23:22
ven7537-Feb-14 23:22 
I have tried like this copying to new bitmap then disposing old bitmap and then saving new bitmap using below code
if (System.IO.File.Exists(serpath))
{

System.Drawing.Image myimage1;
myimage1 = System.Drawing.Image.FromFile(serpath);

System.Drawing.Bitmap source_bitmap = new System.Drawing.Bitmap(myimage1);
myimage1.Dispose();
int thumb_width = 400, thumb_height = 100;
System.Drawing.Bitmap thumb_bitmap = new System.Drawing.Bitmap(thumb_width, thumb_height);
System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(thumb_bitmap);
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
g.FillRectangle(System.Drawing.Brushes.White, 0, 0, thumb_width, thumb_height);
g.DrawImage(source_bitmap, 0, 0, thumb_width, thumb_height);
g.Dispose();

System.Drawing.Imaging.ImageCodecInfo[] Info = System.Drawing.Imaging.ImageCodecInfo.GetImageEncoders();
System.Drawing.Imaging.EncoderParameters Params = new System.Drawing.Imaging.EncoderParameters(1);
Params.Param[0] = new System.Drawing.Imaging.EncoderParameter(System.Drawing.Imaging.Encoder.Quality, 100L);
thumb_bitmap.Save(serpath, Info[1], Params);
}
else
{
signatureImage.Save(serpath, ImageFormat.Jpeg);
}

but then also it is giving error 'System.Runtime.InteropServices.ExternalException' occurred in System.Drawing.dll but was not handled in user code Additional information: A generic error occurred in GDI+ and not able to delete that file also.
how to do this. Please reply me, thanks in advance.
GeneralRe: not able to save image which is already saved with same name and to the same location Pin
TnTinMn8-Feb-14 8:43
TnTinMn8-Feb-14 8:43 
GeneralRe: not able to save image which is already saved with same name and to the same location Pin
ven7539-Feb-14 2:13
ven7539-Feb-14 2:13 
AnswerRe: not able to save image which is already saved with same name and to the same location Pin
PKJain7512-Feb-14 23:51
professionalPKJain7512-Feb-14 23:51 
Questionpopulating data from datagridview into textboxes Pin
Member 105062157-Feb-14 1:10
Member 105062157-Feb-14 1:10 
QuestionRe: populating data from datagridview into textboxes Pin
Eddy Vluggen7-Feb-14 8:55
professionalEddy Vluggen7-Feb-14 8:55 
QuestionError in conversion of application Pin
Ashish Sharma6-Feb-14 18:18
Ashish Sharma6-Feb-14 18:18 
AnswerRe: Error in conversion of application Pin
thatraja6-Feb-14 20:24
professionalthatraja6-Feb-14 20:24 
Questionnot able to Deserialize json signature lines Pin
ven7534-Feb-14 18:36
ven7534-Feb-14 18:36 
AnswerRe: not able to Deserialize json signature lines Pin
Richard Deeming5-Feb-14 2:57
mveRichard Deeming5-Feb-14 2:57 
GeneralRe: not able to Deserialize json signature lines Pin
ven7535-Feb-14 5:17
ven7535-Feb-14 5:17 
GeneralRe: not able to Deserialize json signature lines Pin
Richard Deeming5-Feb-14 5:35
mveRichard Deeming5-Feb-14 5:35 
GeneralRe: not able to Deserialize json signature lines Pin
ven7535-Feb-14 6:11
ven7535-Feb-14 6:11 
GeneralRe: not able to Deserialize json signature lines Pin
Richard Deeming5-Feb-14 6:50
mveRichard Deeming5-Feb-14 6:50 
GeneralRe: not able to Deserialize json signature lines Pin
ven7535-Feb-14 7:18
ven7535-Feb-14 7:18 
GeneralRe: not able to Deserialize json signature lines Pin
Richard Deeming5-Feb-14 8:01
mveRichard Deeming5-Feb-14 8:01 
GeneralRe: not able to Deserialize json signature lines Pin
ven7535-Feb-14 16:09
ven7535-Feb-14 16:09 
GeneralRe: not able to Deserialize json signature lines Pin
Richard Deeming6-Feb-14 1:37
mveRichard Deeming6-Feb-14 1:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.