Click here to Skip to main content
15,917,005 members
Home / Discussions / C#
   

C#

 
QuestionSwitch, case? Pin
nhqlbaislwfiikqraqnm21-Aug-09 5:52
nhqlbaislwfiikqraqnm21-Aug-09 5:52 
AnswerRe: Switch, case? Pin
0x3c021-Aug-09 6:00
0x3c021-Aug-09 6:00 
GeneralRe: Switch, case? Pin
nhqlbaislwfiikqraqnm21-Aug-09 6:10
nhqlbaislwfiikqraqnm21-Aug-09 6:10 
AnswerRe: Switch, case? Pin
Ennis Ray Lynch, Jr.21-Aug-09 6:10
Ennis Ray Lynch, Jr.21-Aug-09 6:10 
GeneralRe: Switch, case? Pin
nhqlbaislwfiikqraqnm21-Aug-09 6:21
nhqlbaislwfiikqraqnm21-Aug-09 6:21 
QuestionHow to store and retrieve ZIP files from oracle 10g. ZIP files consist of heavy satellite images. Pin
Antim Singh Parmar21-Aug-09 5:47
Antim Singh Parmar21-Aug-09 5:47 
AnswerRe: How to store and retrieve ZIP files from oracle 10g. ZIP files consist of heavy satellite images. Pin
Hristo-Bojilov21-Aug-09 8:43
Hristo-Bojilov21-Aug-09 8:43 
Questiondrawing multi line Pin
mgroses21-Aug-09 5:45
mgroses21-Aug-09 5:45 
I try to draw line with this code on a panel (I sent code only related to drawing). I can draw one line but if I want to draw multi line, there is an error like this: ArrgumentException was unhandled, Parameter is not valid.

Where is my fault?


private void panel1_Paint(object sender, PaintEventArgs e)
        {
            

            if (drawLine == true)
            {
            PictureBox PictureBox2 = new PictureBox();
            int x1 = panel1.Width / 2;
            int y1 = panel1.Height / 2;
            PictureBox2.Location = new Point(x1, y1);
            PictureBox2.Size = new System.Drawing.Size(50, 30);
            PictureBox2.SizeMode = PictureBoxSizeMode.CenterImage;
            panel1.Controls.Add(PictureBox2);
                
            PictureBox2.Image = Image.FromFile(@"C:\warehouse.bmp");


           
                for (int i = 0; i < MaxRows; i++)
                {
                    
                    PictureBox PictureBox1 = new PictureBox();
                    PictureBox1.Image = Image.FromFile(@"C:\retailer.bmp");
                    int x = coordinates[i, 0];
                    int y = coordinates[i, 1];

                    PictureBox1.Size = new System.Drawing.Size(25, 25);
                    PictureBox1.SizeMode = PictureBoxSizeMode.CenterImage;
                    PictureBox1.Location = new Point(x1 + x, y1 - y);
                    panel1.Controls.Add(PictureBox1);
                    
                    Graphics g = e.Graphics;
                    Pen myPen = new Pen(Color.Black, 1);
                    g.DrawLine(myPen, x1, y1, x1+x, y1-y);
                    myPen.Dispose();
                    g.Dispose();
                   
                }
            }   
        }



        private void button1_Click(object sender, EventArgs e)
        {
            TakeValues();
                
            drawLine = true;
            panel1.Invalidate();
        }

AnswerRe: drawing multi line [modified] Pin
Henry Minute21-Aug-09 6:46
Henry Minute21-Aug-09 6:46 
GeneralRe: drawing multi line [modified] Pin
mgroses21-Aug-09 10:34
mgroses21-Aug-09 10:34 
GeneralRe: drawing multi line Pin
Henry Minute21-Aug-09 11:41
Henry Minute21-Aug-09 11:41 
GeneralRe: drawing multi line Pin
mgroses22-Aug-09 6:18
mgroses22-Aug-09 6:18 
AnswerRe: drawing multi line Pin
TAFIN22-Aug-09 20:21
TAFIN22-Aug-09 20:21 
QuestionHow to select right size icon from imagelist with multiple resolution icons Pin
shultas21-Aug-09 4:43
shultas21-Aug-09 4:43 
AnswerRe: How to select right size icon from imagelist with multiple resolution icons Pin
Saksida Bojan21-Aug-09 5:31
Saksida Bojan21-Aug-09 5:31 
GeneralRe: How to select right size icon from imagelist with multiple resolution icons Pin
shultas22-Aug-09 2:26
shultas22-Aug-09 2:26 
QuestionHow to insert the values in to two database tables in C# Pin
himanshu_roy8121-Aug-09 3:29
himanshu_roy8121-Aug-09 3:29 
AnswerRe: How to insert the values in to two database tables in C# Pin
Pete O'Hanlon21-Aug-09 3:37
mvePete O'Hanlon21-Aug-09 3:37 
AnswerRe: How to insert the values in to two database tables in C# Pin
Keith Barrow21-Aug-09 3:38
professionalKeith Barrow21-Aug-09 3:38 
AnswerRe: How to insert the values in to two database tables in C# Pin
PIEBALDconsult21-Aug-09 4:38
mvePIEBALDconsult21-Aug-09 4:38 
Questionhow to redirect the page when the particular cell in the datagridview is double clikced Pin
Anjani Poornima21-Aug-09 3:26
Anjani Poornima21-Aug-09 3:26 
AnswerRe: how to redirect the page when the particular cell in the datagridview is double clikced Pin
Henry Minute21-Aug-09 5:51
Henry Minute21-Aug-09 5:51 
GeneralRe: how to redirect the page when the particular cell in the datagridview is double clikced Pin
Anjani Poornima21-Aug-09 22:03
Anjani Poornima21-Aug-09 22:03 
GeneralRe: how to redirect the page when the particular cell in the datagridview is double clikced Pin
Henry Minute22-Aug-09 2:30
Henry Minute22-Aug-09 2:30 
AnswerRe: how to redirect the page when the particular cell in the datagridview is double clikced Pin
Saksida Bojan21-Aug-09 6:32
Saksida Bojan21-Aug-09 6:32 

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.