Zoom problem with a picture within picturebox.?
-
i am trying this...but it doesn't affect on picture. public void OnZoom25(bool zoomEnable) { zoom25Enable = zoomEnable; if (zoom25Enable) { Zoom = 5.25; this.AutoScrollMinSize = new Size((int)(m.Width * Zoom), (int)(m.Height * Zoom)); pbx.Image = m; this.Invalidate(); } } i want to zoom up the picture but picture is in picture box(pbx).. the form's size increses but picture stay there how can i zoom up it with picture ox?
hghghgh
-
i am trying this...but it doesn't affect on picture. public void OnZoom25(bool zoomEnable) { zoom25Enable = zoomEnable; if (zoom25Enable) { Zoom = 5.25; this.AutoScrollMinSize = new Size((int)(m.Width * Zoom), (int)(m.Height * Zoom)); pbx.Image = m; this.Invalidate(); } } i want to zoom up the picture but picture is in picture box(pbx).. the form's size increses but picture stay there how can i zoom up it with picture ox?
hghghgh
tell me if you find out how. :^) try this, i place the picturebox inside a panel(220size) and i allow scroll. maybe you only need this.
...
Image img = Image.FromFile(open_file_dialog.FileName);
if (img.Height > 220 || img.Width > 220)
{
mypicturebox.SizeMode = PictureBoxSizeMode.AutoSize;
mypicturebox.Dock = DockStyle.None;
mypicturebox.Location = new System.Drawing.Point(0, 0);
}
else
{
mypicturebox.SizeMode = PictureBoxSizeMode.CenterImage;
mypicturebox.Dock = DockStyle.Fill;
}good luck X|
nelsonpaixao@yahoo.com.br trying to help & get help
-
tell me if you find out how. :^) try this, i place the picturebox inside a panel(220size) and i allow scroll. maybe you only need this.
...
Image img = Image.FromFile(open_file_dialog.FileName);
if (img.Height > 220 || img.Width > 220)
{
mypicturebox.SizeMode = PictureBoxSizeMode.AutoSize;
mypicturebox.Dock = DockStyle.None;
mypicturebox.Location = new System.Drawing.Point(0, 0);
}
else
{
mypicturebox.SizeMode = PictureBoxSizeMode.CenterImage;
mypicturebox.Dock = DockStyle.Fill;
}good luck X|
nelsonpaixao@yahoo.com.br trying to help & get help