Click here to Skip to main content
15,913,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: do anyone have codes for sql 2005 for saving picture? Pin
Pete O'Hanlon24-Jun-10 3:49
mvePete O'Hanlon24-Jun-10 3:49 
GeneralRe: do anyone have codes for sql 2005 for saving picture? Pin
Luc Pattyn24-Jun-10 3:57
sitebuilderLuc Pattyn24-Jun-10 3:57 
AnswerRe: do anyone have codes for sql 2005 for saving picture? [modified] Pin
Luc Pattyn24-Jun-10 4:05
sitebuilderLuc Pattyn24-Jun-10 4:05 
GeneralRe: do anyone have codes for sql 2005 for saving picture? Pin
Pete O'Hanlon24-Jun-10 4:21
mvePete O'Hanlon24-Jun-10 4:21 
AnswerRe: do anyone have codes for sql 2005 for saving picture? Pin
yu-jian27-Jun-10 9:18
yu-jian27-Jun-10 9:18 
QuestionHow to make a part of the text as superscript in button text Pin
NarVish23-Jun-10 21:40
NarVish23-Jun-10 21:40 
AnswerRe: How to make a part of the text as superscript in button text Pin
Pete O'Hanlon23-Jun-10 22:07
mvePete O'Hanlon23-Jun-10 22:07 
Questionhow to allign the image at the left corner..... Pin
Nivas8223-Jun-10 20:42
Nivas8223-Jun-10 20:42 
Hi,

I have loaded the image after resized to 800x600 (from original image size). but the image aligned at center (picture box size mode is in zoom). how can i align the image at left corner.

code for resize the image
private void resizeimage(Image my, Size sz1)
    {
        double ratio = 0d;
        double myThumbWidth = 0d;
        double myThumbHeight = 0d;
        int x = 0;
        int y = 0;
        Bitmap bp;
        if (f == false)
        {
            if ((my.Width / Convert.ToDouble(sz1.Width)) > (my.Height /
            Convert.ToDouble(sz1.Height)))
                ratio = Convert.ToDouble(my.Width) / Convert.ToDouble(sz1.Width);
            else
                ratio = Convert.ToDouble(my.Height) / Convert.ToDouble(sz1.Height);
        }
        else if (f == true)
        {
            if ((Convert.ToDouble(sz1.Width) / my.Width) > (Convert.ToDouble(sz1.Height)) / my.Height)
                ratio = Convert.ToDouble(my.Width) / Convert.ToDouble(sz1.Width);
            else
                ratio = Convert.ToDouble(my.Height) / Convert.ToDouble(sz1.Height);
        }
        myThumbHeight = Math.Ceiling(my.Height / ratio);
        myThumbWidth = Math.Ceiling(my.Width / ratio);
        Size thumbSize = new Size((int)myThumbWidth, (int)myThumbHeight);
        bp = new Bitmap(sz1.Width, sz1.Height);
        x = (sz1.Width - thumbSize.Width) / 2;
        y = (sz1.Height - thumbSize.Height);
        System.Drawing.Graphics g = Graphics.FromImage(bp);
        g.SmoothingMode = SmoothingMode.HighQuality;
        g.InterpolationMode = InterpolationMode.HighQualityBicubic;
        g.PixelOffsetMode = PixelOffsetMode.HighQuality;
        rect = new Rectangle(x, y, thumbSize.Width, thumbSize.Height);
        g.DrawImage(my, rect, 0, 0, my.Width, my.Height, GraphicsUnit.Pixel);
        pictureBox1.Image = bp;

GeneralRe: how to allign the image at the left corner..... Pin
Nivas8223-Jun-10 21:16
Nivas8223-Jun-10 21:16 
QuestionHow to display excel sheet inside a windows form Pin
vineesh v23-Jun-10 20:28
vineesh v23-Jun-10 20:28 
QuestionLatency Meter Pin
satsumatable23-Jun-10 19:20
satsumatable23-Jun-10 19:20 
AnswerRe: Latency Meter Pin
DaveAuld23-Jun-10 20:09
professionalDaveAuld23-Jun-10 20:09 
QuestionInsert dataset into database Pin
shoubi23-Jun-10 16:31
shoubi23-Jun-10 16:31 
AnswerRe: Insert dataset into database Pin
PIEBALDconsult23-Jun-10 17:39
mvePIEBALDconsult23-Jun-10 17:39 
GeneralRe: Insert dataset into database Pin
shoubi23-Jun-10 17:43
shoubi23-Jun-10 17:43 
GeneralRe: Insert dataset into database Pin
PIEBALDconsult23-Jun-10 17:57
mvePIEBALDconsult23-Jun-10 17:57 
GeneralRe: Insert dataset into database Pin
shoubi23-Jun-10 18:07
shoubi23-Jun-10 18:07 
GeneralRe: Insert dataset into database Pin
PIEBALDconsult23-Jun-10 18:17
mvePIEBALDconsult23-Jun-10 18:17 
GeneralRe: Insert dataset into database Pin
shoubi23-Jun-10 19:21
shoubi23-Jun-10 19:21 
Questiongetting the local port as netstat in C# + small doubt on network connection Pin
manustone23-Jun-10 9:37
manustone23-Jun-10 9:37 
AnswerMessage Closed Pin
23-Jun-10 20:49
stancrm23-Jun-10 20:49 
GeneralRe: getting the local port as netstat in C# + small doubt on network connection Pin
manustone23-Jun-10 22:02
manustone23-Jun-10 22:02 
Question[newbie] EventLog log = new EventLog() does not work within catch {} block Pin
jon-8023-Jun-10 5:44
professionaljon-8023-Jun-10 5:44 
AnswerRe: [newbie] EventLog log = new EventLog() does not work within catch {} block Pin
Ennis Ray Lynch, Jr.23-Jun-10 5:59
Ennis Ray Lynch, Jr.23-Jun-10 5:59 
GeneralRe: [newbie] EventLog log = new EventLog() does not work within catch {} block Pin
jon-8023-Jun-10 6:23
professionaljon-8023-Jun-10 6:23 

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.