algates0027 0 Newbie Poster

HI THIS IS MY CODE..I WANT TO ZOOM THE BITMAP..HOW IT IS POSIBBLE???

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class Form1 : Form
     {
 public Bitmap bmp;
private Graphics  grfx;
        public Form1()
        {
          bmp=new Bitmap(this.Width,this.Height);
           grfx=Graphics.FormImage(bmp);
           grfx.PageUnit=GraphicsUnit.Millimeter;
          this.Autoscrollminsize=bmp.Size;
            InitializeComponent();
        }
         protected override void OnMouseClick(MouseEventArgs e)
         {
             grfx.DrawRectangle(new Pen(color.Red),2,2,30,50);
            base.OnMouseClick(e);
         }

       protected override void OnMouseWheel(MouseEventArgs e)                       
        {

                                             /// here i want to perform the zoom operation of the bitmap (or) grfx...
            base.OnMouseWheel(e);
        }
    protected override void OnPaint(PaintEventArgs pe)
        {
             Graphics  Grfxbmp=pe.graphics;
Grfxbmp.DrawBitmap(bmp,this.AutoscrolPosition.x,AutoscrolPoisition.y,bmp.width,bmp.height);
            base.OnPaint(e);
        }


    }
}

Thanks And regards,
ALGATES....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.