.net - Zooming In Picturebox But With Same Resolution?

Jun 29, 2011

I have a picturebox with zooming/pan capabilities. I am now starting with the zoom. I did that by:

getting the mousescroll event( up or down)
add height and width to the picturebox
get the pixel coordinates of mouse inside the image.

my problem is that, when i change the size of the picturebox, the pixel coordinates in the picture is not the same with the previous image without zoom. I need the coordinates to be the same even the picture is zoomed.


Add Zooming Option For Picturebox Using C#?

Sep 12, 2009

i need to add zooming option for picture box with C#

View 1 Replies View Related

Zooming Image In Picturebox?

Mar 23, 2011

i have a question to do with vb.net. i have a picturebox with zooming capabilities. but i want the zoom button to zoom a certain percentage with each click. for example:

1st click zoom image(1.5)
2nd click zoom image(2)
3rd click zoom image (2.5)


View 2 Replies View Related

Zooming In And Out From A Picturebox With A Trackbar

Nov 6, 2010

I have a trackbar in my application where somebody can zoom in and out from a picture.

I can now zoom in with this code under the Value changed event of the Trackbar:

Private Sub TrackBar1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TrackBar1.ValueChanged
''Dim scalefactor As SizeF


View 1 Replies View Related

Zooming Picturebox On Panel?

Sep 20, 2011

I've been trying to get zoom capabilities on this

Public Class Form1
Private m_PanStartPoint As Point
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _


I can drag the whole panel around and scroll thru the picture but some of my images are quite large in length, is there any way for me to add zoom in or out capabilities to this code? tried adding a couple of button on my panel for "Zoom in" and "Zoom Out" but no functionality, sorry for the syntax i deleted the code before this post trying to do it from memory, after i double clicked the button it gave me the

private sub handles button click
private sub handles button click


View 5 Replies View Related

How To Enable Zooming And Scrolling In Picturebox

Jan 13, 2012

I'm trying to make a picture viewer, with which users can see the actual size and fit screen size of the picture. They can also zoom in and zoom out and control the view with scroll box. If its not possible by picture box then what other control should I use?

View 2 Replies View Related

Zooming An Image In A Picturebox Using Trackbar?

Jun 13, 2011

how can i zoom an image inside a picturebox? and i also want to know how can i make a picture inside the picturebox draggable while at the same time, it can be zoomed in and out.

my goal is to crop an image inside the picturebox and i can zoom and drag the image inside if necessary

View 2 Replies View Related

Interface And Graphics :: PictureBox Is Zooming Up Images?

Jan 5, 2011

I managed to combine two .png images into one, and then display the result in a pictureBox image.However, the pictureBox seems to scale up my image! Makes it bigger!The pictureBox size is 96x128. The two images I have combined are 96x128. The pictureBox's SizeMode is set to "Normal"I have noticed that even though the pictureBox's image seems to be zoomed, it is cut to keep the 96x128 rect. But I don't want it to be zoomed...

View 6 Replies View Related

VS 2005 - Zooming PictureBox On Mouse Hover

Feb 6, 2010

I've found an example of what I'm trying to do. The form will have 2 picture boxes. The first will be the original image. The second will have the zoomed image. Once I move my mouse over the first image, it must display a zoomed image in picturebox 2. I've attached the code that I found (written in C#) of what I'm trying to do. I've converted the code for me to VB. I want my first picturebox to be smaller than my second one. And the attached example shows that the first picturebox is bigger than the second one. I've never tried something like this, or drawing images etc. Just resize the 1st picturebox to be smaller that the second one, move with your mouse over the first one, and will see what I mean. I don't want to click on the image to have it zoomed or use the mouse wheel. Just want to hover over the image and display the zoomed version..

View 2 Replies View Related

Get List Of All Resolution Of Client Monitor And Check With Resolution Passed By Application?

Dec 5, 2009

How to get list of all resolution of client monitor and check with resolution passed by application

View 2 Replies View Related

Make An Application Look As Though It Has Been Set To A Screen Resolution Of 1024 X 768 When The True Resolution Different?

Oct 2, 2009

1. Is there anyway to make an application look as though it has been set to a screen resolution of 1024 x 768 when the true resolution different?

2. I am developing my app using a widescreen monitor. What dimensions does the form need to be set to so that it looks exactly the same on a normal & widescreen monitor?

View 1 Replies View Related

Screen Resolution - Change The Size On The Form And The Button When Its Ran On A Different Resolution

Oct 22, 2007

I am working on an program and I need it to change the size on the form and the button etc when its ran on a different resolution then it was coded on. Is there anyway to do this easy or do I have to hard code it on two different and change it by like a button etc? I am working with a 1024 X 780 and a 1240 X 1024.

View 8 Replies View Related

Change Resolution Of Form Based On Screen Resolution

Jan 10, 2011

I have a very high screen resolution on my laptop: 1400x1050.My colleague tried it out on his laptop (which had lesser resolution), and the application did not fit on his laptop. The buttons were dragging out of the screen space.So, I want my application to automatically resize/adjust based upon the screen resolution.I don't want to use Maximized screen option and don't want to change user's pc settings.Unfortunatly I am not using Table Layout panel.

View 5 Replies View Related

Change User Control Resolution According To Screen Resolution?

Dec 29, 2010

In my application,I placed the user control on a panel,I want to resize that control on a panel automatically according to different screen resolution.

View 6 Replies View Related

Setting Windows Form Resolution According To Screen Resolution?

Jun 18, 2012

Can we set the windows form resolution according to pc screen resolution and even the control should be adjusted...


My screen resolution is 1366 X 768

and my form size is 1254, 709....but I want it so set according to the screen and it will be dynamic...

if I transfer my project to some other pc with lower or higher resolution it should be adjusted....

and suppose I have few controls on the form...will that also be adjusted??

View 6 Replies View Related

VS 2010 Set Form Resolution Like Current Screen Resolution

Dec 20, 2010

I had designed all forms on 1280/800 screen resolution.

i want set all forms resolution like the current screen resolution of the user,or make the form resolution is dynamic with each resolution of screen for

View 6 Replies View Related

IDE :: Zooming & Editing In PicCanvas?

Mar 4, 2011

i was trying a painting applicaion in which i am trying Zooming and editing.it means after zooming i will edit or draw the some thing in the canvas.i i am able to do that but th problem is scalling. here i ma using the translate transform to zooming.

after zooming if i draw somthing my mouse positions are not correct.


View 6 Replies View Related

Scrolling & Zooming With Picture Box

Apr 3, 2012

I have a picture box control on a form that displays an image that I draw. I create a bitmap (oBM) using the picture box's ClientSize width and height. Then I create a graphics object to draw on... OutputDevice = Graphics.FromImage(oBM)


View 3 Replies View Related

Bitmaps: Zooming To Pixel Level?

Jan 9, 2012

I'm experimenting with the various graphics, bitmap and image functions of vb.net 2010, with the aim of being able to create an image processing tutorial program for my Physics AS group.  Currently, I'm trying to zoom in to an image so that individual pixels are clearly visible.  The below code shows what I'm doing.

My problem is that the zoomed in image always comes out blurred; the individual square pixels are not visible. I presume this is because as the DrawImage method resizes the image, it re-samples the image in some way. Is there a way of resizing the image while retaining the pixels as in the original image, so that individual pixels are visible? I've tried several other methods, including drawing to a picturebox control and then resizing the picturebox with the size mode set to zoom or stretch... this results in the same blurred image.


View 7 Replies View Related

VS 2008 Zooming In On A Graphics Object?

Aug 31, 2011

I need serious advice here please. I use Visual Basic Graphics Programming by Rod Stephens as a reference, and I have visited his site vb-helper.com to try some of his tutorials. I tried the scribble application and it's working out fine (you can download the snippet from his site).

What I have trouble with is zooming in. I am not sure where to start. I would like to zoom in to x2, x3 and etc. of the bitmap I am working on and I would like to be able to continue to edit the bitmap. This would mean that I have a larger pixel brush under the mouse cursor, to lay down pixels. So a x2 zoom would mean a 2 x 2 pixel.

Has someone done this. Do you have a reference I can use for this. This kind of editing is standard in almost every paint package. Even Microsoft Paint, but there is not too much basic information on how it fits together in code for vb .net. So I am looking for someone to point me in the right direction. As I said, I am using the scribble application as a base, so here is the link. [URL]..

View 4 Replies View Related

Zedgraph EnableWheelZoom - Get Axis Values After Zooming?

Dec 16, 2011

In my vb.net project, I use zedgraph to draw figures. I find that the following properties work well to zoom figure on the center of mouse.


View 2 Replies View Related

Interface And Graphics :: Zooming, Rotating And Panning Using Transformations?

Aug 6, 2008

In VB2005 GDI+, it's not too difficult to get zooming and panning working together, or rotating and panning. But I am finding it very difficult to get all three functions working in coordinatioin. The code below is the nearest I have reached so far. It's a working example on a standard Windows Form, but please supply your own image. The user can drag the image with the left mouse button, and toggle wheel zooming or rotating by tapping the space bar. Both zooming and rotating work. But the stationary centre of zooming or rotating (marked by a red cross in the example) remains relative to the image.

View 1 Replies View Related

Making A Simple Image Editor And Added Zooming And Drawing With Mouse Position Like A Pencil?

Sep 11, 2009

Im making a simple image editor and I added Zooming and Drawing with mouse position like a pencil. My problem is When I zoom the image and try to draw on it, everything becomes offset and the lines i drew are not even close to the mouse. Here is My code ( Just add a button1 and Picturebox1 with an image)

Public Class Form1
Dim pen1 As Pen
Dim x1, y1, x2, y2 As Integer
Dim gr As Graphics


View 4 Replies View Related

Adding Picture To Dynamic Picturebox From My.resources In .dll - Duplicate Semi Functional Picturebox Added Too

Jan 27, 2010

when adding picture to dynamic picturebox from my.resources in .dll a duplicate semi functional picturebox is added too, behind the picturebox i intended to add. has anyone seen this happening before or can provide any insight into this?

View 1 Replies View Related

Draw Line On PictureBox In .NET When Pass PictureBox As Parameter To Some Function

Jul 17, 2010

In VB6 I used some pattern of programming..I passed the picturebox as parameter to some procedure in some class and inside this procedure paint all needed graphics using this class methods.Now I want upgrade my application to vb.netBut all samples for line drawing show me how to draw inside paint event.[code]

View 2 Replies View Related

VS 2008 PictureBox Always Repainted - PaintEventHandler Connected To A Picturebox Via AddHandler

Mar 31, 2010

I have a PaintEventHandler connected to a picturebox via AddHandler.

In PaintEventHandler I have coded this for writing the drawing to PictureBox1.Image:

Dim PictureBox1 As PictureBox = CType(sender, PictureBox)
PictureBox1.Image = New Bitmap(PictureBox1.Width, PictureBox1.Height)
Dim bmp As Image = PictureBox1.Image
Dim g As Graphics = Graphics.FromImage(bmp)

... drawing something ...

PictureBox1.Image = bmp

Everything works fine but after running through the paint event handler and showing the picture on the screen it calls the painthandler again and again. It does not stop.

Replacing the code above with

Dim g As Graphics = e.Graphics

Makes it running. But then I cant save the Image to a file.

View 6 Replies View Related

Drag Image From Picturebox To A Dynamically Created Picturebox?

Sep 27, 2009

I have a program I'm working on that, for one of the features, allows the user to drag an image from a picturebox, into the main form space, anywhere they want. [code]...

When trying to drag the image from the CurrentTilePicBox, the very moment I move the mouse while dragging the cursor becomes a circle with a cross and won't drag and drop into the new picturebox.

View 1 Replies View Related

Making A GDI++ Game - Monster(picturebox) To Go After The Player(picturebox)

Jan 14, 2010

Hey I am making a GDI++ game in vb.net. Now what I want is the monster(picturebox) to go after the player(picturebox). There Are No Vertical Walls. Only The Edge of map barriers. For example to get to the player the AI would have to go to the end of the ledge and either jump off and fall to the lower ledge or take the ladder down. There is no jumping, only falling and going up and down ladders and across the horizontal ledges. So How Can I make this pathfinding system?

View 18 Replies View Related

Pass The Mouse Between The Picturebox And Panel, The Picturebox Disappears?

Feb 28, 2012

I have a panel, which contaisn two Pictures.When the panel is mousehover the Pictures appears. When the panel is mouseleave the Pictures disappears.However, when I'm trying to pass the mouse between the Picturebox and Panel, the Picturebox disappears, because the panel doesn't detect that as panel area.

Private Sub Panel_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles Panel.MouseHover
Me.NextIMG.Visible = True
Me.PrevIMG.Visible = True
End Sub

Private Sub Panel_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Panel.MouseLeave
Me.NextIMG.Visible = False
Me.PrevIMG.Visible = False


View 3 Replies View Related

Picturebox Transparency - App Has Scrolling Images In The Background And A Picturebox On Top

Feb 28, 2009

My app has scrolling images in the background and a picturebox on top. The image in the picturebox has transparent parts. How can It so that the transparent parts show whatever is belo the picture box, not the form background? I have tried taking screenshots and positioning them as background but this just freezes the app.

Dim ScreenSize As Size = New Size(154, 83)
Dim screenGrab As New Bitmap(154, 83)
Dim blank As New Bitmap(100, 300)


View 1 Replies View Related

Transparent Picturebox As Grid For A Plotting Control (another Picturebox)?

Jan 31, 2011

I need to plot some analog values read from the serial port.I plot them in a picturebox starting from left. When I reach the end of the control at the right side I shift all values to the left of a point and I plot the new point at the right, (I have some flickering but it could be acceptable). This is my plotting control.My problem is that I have to clear the control (picturebox) in order to plot the shifted graph, but the method Clear of the Graphics class clears everything inside the picturebox, even my grid.How can i make always visible a grid "in" my picturebox?

1.a transparent image with a grid over the PB? (the clear method cannot remove it)

2.an image with a grid below the picturebox that must be with a transparent background to make visible the grid?

3.multiple layers on the same picturebox?

View 5 Replies View Related

VS 2008 Add Picturebox During Runtime And Loading Image Into Picturebox?

Feb 8, 2010

i'm doing a simple form tat could add picturebox during runtime and i could add several picture into it.

View 5 Replies View Related

Click A PictureBox And Then Move That PictureBox With Keyboard?

Nov 11, 2009

Ok, so I have a new challenge for the D.I.C. Heads. I'm making a simple little game using VB controls. I know it's not the best idea in the world but it'll have to do for now!

Here is whats happening. I've created a class that inherits the PictureBox control that I want to use to place my game pieces on the playing field.

Dim pbArmyUnit(0) As ArmyUnit ' ArmyUnit is a Class that inherits Picturebox now I create the playing pieces at runtime as needed and append them to the array. Player currently buys the units and places them on the playing field.


On a side note how can I look at a stack of pictureboxes all created at runtime to determine whats at a particular location? Example. I move my army unit over top of the picturebox that shows my forest. How can I tell what picturebox I just moved on top of? does that make sense? I don't need code for this just directions on looking at the right info so I can figure it out.

I am creating my terrain at runtime as well since it's randomly generated. and I'm basically making an array of 192 pictureboxes with the appropriate terrain image as well as some other modifiers. Just like with my armies above I've inherited picturebox and created a terrain class array, this way I'm able to add my movement modifiers etc, directly to the picturebox I place on the screen. It's these pieces of terrain that I want to be able to check before allowing the unit to move into them! to get movement costs etc.

View 3 Replies View Related

Create An Event For Picturebox Entering Another Picturebox?

Dec 4, 2011

how do i create an event for MouseEnter but instead of the mouse a picturebox?

View 5 Replies View Related

Picturebox Zoom While Maintaining Same Size Of Picturebox?

Jul 8, 2011

I have a picturebox on a form.  The image in the picturebox is actually a report. I want it so if the user clicks on it it will zoom larger --- while the picturebox remains the same size. Of course, the entire image will no longer be seen.  So I also want to be able to drap this image around with the cursor.  The examples I've found for picturebox zooming cause the picturebox itself to get bigger and smaller. I need it to be like an Access report. Click on the report and it gets bigger. Click again and it goes back to the full image. Does anyone know of an example or tutorial in VB.Net for this type of zoom-with-fixed-size picturebox function?

View 2 Replies View Related

VS 2008 - Draw A Line On Top Of A Picturebox But It Keeps Going Behind The Picturebox?

Jan 4, 2011

I am trying to draw a line on top of a picturebox but it keeps going behind the picturebox, even when I do Line.BringToFront()

View 10 Replies View Related

VS 2008 Drag/Drop From Picturebox To Picturebox?

Jul 13, 2009

I was wondering how could I drag an image from a picturebox to another picture box. Anyone knows? Any tut or something.

View 10 Replies View Related

VS 2010 New PictureBox Located Relative To Another PictureBox

Jan 21, 2011

I am working on a small desktop form in VB 2010 and am trying to place a pictureBox with an image in it, next to another pictureBox already located on the form when the user clicks a button.

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim tool As String


But for some reason the newPictureBox with image from "ptext" does not show up on the form. When I specify the new Point to be something like, (50,50) instead of getting the first pictureBox coordinates, the new pictureBox shows up in the right place.

Am I using System.Drawing.Point wrong? Or is there some other error that I'm making?

View 2 Replies View Related

Get My Screen Resolution?

Dec 29, 2010

How to get screen resolution?

View 2 Replies View Related

Get Resolution Of Any Application?

Jun 22, 2009

how to get resolution of any application?

View 4 Replies View Related

Copyrights 2005-15 www.BigResource.com, All rights reserved