Click here to Skip to main content
15,898,222 members
Home / Discussions / C#
   

C#

 
GeneralRe: help me Pin
JHizzle21-May-10 1:10
JHizzle21-May-10 1:10 
GeneralRe: help me Pin
Pete O'Hanlon21-May-10 2:16
mvePete O'Hanlon21-May-10 2:16 
AnswerRe: help me Pin
Johnny J.21-May-10 0:51
professionalJohnny J.21-May-10 0:51 
AnswerRe: help me Pin
Abhinav S21-May-10 2:45
Abhinav S21-May-10 2:45 
GeneralRe: help me Pin
Dave Kreskowiak21-May-10 3:11
mveDave Kreskowiak21-May-10 3:11 
QuestionUser Control Pin
bubuzzz21-May-10 0:47
bubuzzz21-May-10 0:47 
AnswerRe: User Control Pin
Luc Pattyn21-May-10 2:30
sitebuilderLuc Pattyn21-May-10 2:30 
GeneralRe: User Control Pin
bubuzzz21-May-10 14:17
bubuzzz21-May-10 14:17 
Thank you for replying me. I dont think this is the problem of the memory usage coz i checked it carefully.
This is the code my ImageArea class (user control):
public Image LoadImage()
        {
            Image tmpImage = Image.FromFile(imageName);
            Bitmap tmpBitmap = new Bitmap(100, 100);
            Graphics graphics = Graphics.FromImage((Image)tmpBitmap);
            graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
            graphics.DrawImage(tmpImage, 0, 0, 100, 100);

            tmpImage.Dispose();
            graphics.Dispose();

            return (Image)tmpBitmap;
        }

        protected override void  OnPaint(PaintEventArgs e)
        {
            Image tmpImage = LoadImage ();
            Graphics graphics = e.Graphics;
            graphics.DrawImage(tmpImage, 0, 0);
            tmpImage.Dispose();
            graphics.Dispose();
        }


When i press the button ok in the openFileDialog, it will run the AddImageArea function to add the control to the flowLayoutPanel
And this is the code of AddImageArea

public ImageArea AddImageArea(string filename)
       {
           ImageArea pbObj = new ImageArea();

           pbObj.ImageName = filename;
           pbObj.Width = 100;
           pbObj.Height = 100;
           pbObj.ImageName = filename;
           pbObj.BorderStyle = BorderStyle.FixedSingle;

           return pbObj;
       }

GeneralRe: User Control Pin
Luc Pattyn21-May-10 14:42
sitebuilderLuc Pattyn21-May-10 14:42 
QuestionAccess Oracle database in Linux System through windows system. Pin
Narasimha Murthy SR21-May-10 0:00
Narasimha Murthy SR21-May-10 0:00 
AnswerQL Pin
Alex Manolescu21-May-10 0:41
Alex Manolescu21-May-10 0:41 
QuestionHow to check for different datbase errors Pin
Chiman120-May-10 23:43
Chiman120-May-10 23:43 
AnswerRe: How to check for different datbase errors Pin
PIEBALDconsult21-May-10 3:39
mvePIEBALDconsult21-May-10 3:39 
QuestionUsing dynamic enum as type in a parameter of a method Pin
dashingsidds20-May-10 23:25
dashingsidds20-May-10 23:25 
AnswerRe: Using dynamic enum as type in a parameter of a method Pin
dashingsidds21-May-10 1:36
dashingsidds21-May-10 1:36 
AnswerRe: Using dynamic enum as type in a parameter of a method Pin
PIEBALDconsult21-May-10 3:46
mvePIEBALDconsult21-May-10 3:46 
AnswerRe: Using dynamic enum as type in a parameter of a method Pin
T M Gray21-May-10 5:19
T M Gray21-May-10 5:19 
QuestionDuplicate form with every instantiation of a class?? Pin
Jibrohni20-May-10 22:03
Jibrohni20-May-10 22:03 
AnswerRe: Duplicate form with every instantiation of a class?? Pin
OriginalGriff20-May-10 23:56
mveOriginalGriff20-May-10 23:56 
GeneralRe: Duplicate form with every instantiation of a class?? Pin
Jibrohni21-May-10 0:29
Jibrohni21-May-10 0:29 
GeneralRe: Duplicate form with every instantiation of a class?? Pin
Jibrohni21-May-10 0:47
Jibrohni21-May-10 0:47 
GeneralRe: Duplicate form with every instantiation of a class?? Pin
OriginalGriff21-May-10 1:09
mveOriginalGriff21-May-10 1:09 
GeneralRe: Duplicate form with every instantiation of a class?? Pin
Luc Pattyn21-May-10 2:42
sitebuilderLuc Pattyn21-May-10 2:42 
AnswerRe: Duplicate form with every instantiation of a class?? Pin
PIEBALDconsult21-May-10 4:28
mvePIEBALDconsult21-May-10 4:28 
QuestionSelectedValue and comboboxen Pin
redspiderke20-May-10 21:44
redspiderke20-May-10 21:44 

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.