Click here to Skip to main content
15,895,142 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to get object from array with selectedindex of listview Pin
Shameel16-Nov-09 7:24
professionalShameel16-Nov-09 7:24 
GeneralRe: How to get object from array with selectedindex of listview Pin
Aljaz11116-Nov-09 7:28
Aljaz11116-Nov-09 7:28 
GeneralRe: How to get object from array with selectedindex of listview Pin
Saksida Bojan16-Nov-09 7:37
Saksida Bojan16-Nov-09 7:37 
GeneralRe: How to get object from array with selectedindex of listview Pin
Luc Pattyn16-Nov-09 7:40
sitebuilderLuc Pattyn16-Nov-09 7:40 
GeneralRe: How to get object from array with selectedindex of listview Pin
Aljaz11116-Nov-09 11:11
Aljaz11116-Nov-09 11:11 
GeneralRe: How to get object from array with selectedindex of listview Pin
Luc Pattyn16-Nov-09 11:28
sitebuilderLuc Pattyn16-Nov-09 11:28 
GeneralRe: How to get object from array with selectedindex of listview Pin
Shameel16-Nov-09 23:09
professionalShameel16-Nov-09 23:09 
QuestionImages are shrunken => i want to get them shrink-proof Pin
tronix0116-Nov-09 4:22
tronix0116-Nov-09 4:22 
Hello @ all

I have a problem with my generated PNG - Images.
It's a bit strange for me but may be someone now what i can do to solve this problem.

My windows service create on the fly PNG - Images and store them as binary in a database.
The stored images are displayed later with a crystal report in a windows app.

That works very fine since years and also with different pc's (most XP-OS), but there is a problem with a new PC (XP-OS) since a few days.

All images are displayed shrunken in the reports and it's not the whole report.... only the images. Text- and Report still proportional.

Could it be that something is missing at the new machine ?

Any ideas how this could be ?

Thanks a lot!


Bitmap		couponImg     = null;
Font		font          = null;
Graphics	graphic	      = null;

try
{
couponImg = new Bitmap(coupon.Width, coupon.Height, PixelFormat.Format24bppRgb);

     using (graphic = Graphics.FromImage(couponImg)) //V1.01.03.01
          {
            graphic.Clear(coupon.BackgroundColor);
     
            graphic.InterpolationMode  = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
            graphic.PixelOffsetMode    = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
            graphic.TextRenderingHint  = System.Drawing.Text.TextRenderingHint.AntiAlias;
            graphic.TextContrast       = 0;
            graphic.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
            graphic.SmoothingMode      = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;

            if (coupon.couponCellCollection != null && coupon.couponCellCollection.Count > 0)
            {
              for (int idx = 0; idx < coupon.couponCellCollection.Count; idx++)
              {
                font = new Font(coupon.font, (float)coupon.couponCellCollection[idx].fFontSize, FontStyle.Bold, GraphicsUnit.Millimeter);

                graphic.DrawString(coupon.couponCellCollection[idx].sCellValue, font, Brushes.Black, new PointF(coupon.couponCellCollection[idx].iPosX, coupon.couponCellCollection[idx].iPosY));

                font = null;
              }
            }
            graphic.DrawImage(couponImg, new Rectangle(0, 0, coupon.Width, coupon.height), 0, 0, coupon.Width, coupon.height, GraphicsUnit.Pixel);
        
            graphic.Flush(); //V1.01.03.01
          }
	}
     }
     catch (Exception)
     {
	couponImg = null;
     }
     finally
     {
        if (graphic != null)
        {
        //  graphic.Dispose();
        //  graphic.Flush(); //V1.01.03.01
          graphic = null;
        }
     }

QuestionWord Interop: Unable to save text in a document Pin
mailtogj16-Nov-09 4:21
mailtogj16-Nov-09 4:21 
AnswerRe: Word Interop: Unable to save text in a document Pin
EliottA16-Nov-09 4:33
EliottA16-Nov-09 4:33 
GeneralRe: Word Interop: Unable to save text in a document Pin
mailtogj17-Nov-09 4:48
mailtogj17-Nov-09 4:48 
QuestionOutlook VSTO Appointment Item Delete Event Pin
Programm3r16-Nov-09 3:52
Programm3r16-Nov-09 3:52 
QuestionHelp with BackgroundWoker Pin
Etienne_12316-Nov-09 3:48
Etienne_12316-Nov-09 3:48 
AnswerRe: Help with BackgroundWoker Pin
Not Active16-Nov-09 4:05
mentorNot Active16-Nov-09 4:05 
AnswerRe: Help with BackgroundWoker Pin
The Man from U.N.C.L.E.16-Nov-09 4:14
The Man from U.N.C.L.E.16-Nov-09 4:14 
GeneralRe: Help with BackgroundWoker Pin
Not Active16-Nov-09 6:23
mentorNot Active16-Nov-09 6:23 
AnswerRe: Help with BackgroundWoker Pin
Luc Pattyn16-Nov-09 7:20
sitebuilderLuc Pattyn16-Nov-09 7:20 
QuestionNullable Rectangle Pin
gwithey16-Nov-09 3:00
gwithey16-Nov-09 3:00 
AnswerRe: Nullable Rectangle Pin
The Man from U.N.C.L.E.16-Nov-09 4:11
The Man from U.N.C.L.E.16-Nov-09 4:11 
QuestionDrawing time instead of numbers in opengl Pin
Paul Harsent16-Nov-09 2:56
Paul Harsent16-Nov-09 2:56 
QuestionHow to selected drowndown list options in web browser Pin
fatix16-Nov-09 2:51
fatix16-Nov-09 2:51 
AnswerRe: How to selected drowndown list options in web browser Pin
Shameel16-Nov-09 3:29
professionalShameel16-Nov-09 3:29 
GeneralRe: How to selected drowndown list options in web browser Pin
fatix16-Nov-09 3:33
fatix16-Nov-09 3:33 
GeneralRe: How to selected drowndown list options in web browser Pin
Shameel16-Nov-09 7:19
professionalShameel16-Nov-09 7:19 
QuestionRe: How to selected drowndown list options in web browser Pin
fatix16-Nov-09 7:38
fatix16-Nov-09 7:38 

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.