saifullah khan

saifullah khan

  • NA
  • 335
  • 295.2k

draw vertical lines on image using c#

Feb 10 2012 3:00 AM
Hi!
i have a widows form in c#. what i want is to create an app that draw vertical line on a bitmap image. for that i wrote the following code:
   private void Form1_Load(object sender, EventArgs e)
            {
                  Bitmap bmOriginal = new Bitmap("kpk.bmp");
                  Rectangle cloneRect = new Rectangle(0,0 , 200, 200);
                  System.Drawing.Imaging.PixelFormat format =
                     bmOriginal.PixelFormat;
 
                  Bitmap bmTile1 = bmOriginal.Clone(cloneRect, format);
                  pictureBox1.Image = bmTile1;
              
                  }
but when i run the app is does not show the lines on image.i tried to change the values in ractangle but it didnt effect. can somebody tells me what wrong and what i need to do.?or any other C# source for that....?
thanks in advance

Answers (1)