473,320 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Panel with picturebox scrollbar

hi wagner,
i have a doubt in panel control in windows application.

i have a panel control wherein i have put a picturebox control.
i show picture into picturbox control.

now i need to zoom in and zoom out the picture in the picturebox
control.
the picturebox control is within panel(autoscroll is enabled true)
scroll bars are enabled.

PictureBox1.Width = PictureBox1.Width + 25
PictureBox1.Height = PictureBox1.Height + 25

the problem is the picture goes only to right side when it gets its size
enlarged.

then i used left and top properties

PictureBox1.Width = PictureBox1.Width + 25
PictureBox1.Height = PictureBox1.Height + 25
PictureBox1.Left = PictureBox1.Left - 20
PictureBox1.Top = PictureBox1.Top - 5

the above code streched the picture both left and right side...but the
problem is i can scroll right side and see the picture but i could not
scroll left side to see picture streched on the left side.

i need to strech and zoom in and out both sides and should be viewed
thru scrollbars both sides using panel.

thanks in advance,

regards,
Thiru.

Regards,
Thiru.S

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 23 '05 #1
4 10528
Hi,

Will you be so kind not to address messages to certain people active in this
newsgroup, especially not in this impolite way.

If you want to refer to another message, than connect it as a reply to the
message from the one who has answered you.

What your ask is AFAIK not not standard, however I *thought* that there is
in the 101 samples (advanced GDI) one that shows what you want to do.

http://www.microsoft.com/downloads/d...displaylang=en

I hope this helps,

Cor
Nov 23 '05 #2
Hi cor,
i regret if u felt my mail to be impolite way. actually by mistake i
sent that mail in general.. i thought of sending thru thread messages.

that is why i addressed it to a particular person in the group.

anyways i regret for it.


Regards,
Thiru.S

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 23 '05 #3
"Thiru .Net" <th*********@walla.com> schrieb:
i have a doubt in panel control in windows application.

i have a panel control wherein i have put a picturebox control.
i show picture into picturbox control.

now i need to zoom in and zoom out the picture in the picturebox
control.
the picturebox control is within panel(autoscroll is enabled true)
scroll bars are enabled.

PictureBox1.Width = PictureBox1.Width + 25
PictureBox1.Height = PictureBox1.Height + 25

the problem is the picture goes only to right side when it gets its size
enlarged.


I am not able to repro the problem using .NET 1.1 and the code mentioned
above.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #4

below is the actual code i tried. pls try this...
-------------------------------------------

Public Class Form1
Inherits System.Windows.Forms.Form

Private Sub btnZoomOut_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnZoomOut.Click
PictureBox1.Width = PictureBox1.Width + 100
PictureBox1.Height = PictureBox1.Height + 75
PictureBox1.Left = PictureBox1.Left - 50
PictureBox1.Top = PictureBox1.Top - 20
End Sub

Private Sub btnZoomIn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnZoomIn.Click
PictureBox1.Width = PictureBox1.Width - 25
PictureBox1.Height = PictureBox1.Height - 25
PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage

End Sub

Private Sub PictureBox1_MouseUp(ByVal sender As System.Object, ByVal e
As System.Windows.Forms.MouseEventArgs) Handles
PictureBox1.MouseUp
PictureBox1.Width = PictureBox1.Width + 100
PictureBox1.Height = PictureBox1.Height + 100
End Sub

Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnBrowse.Click
OpenFileDialog1.ShowDialog()
PictureBox1.Image =
System.Drawing.Image.FromFile(OpenFileDialog1.File Name)
TextBox1.Text = OpenFileDialog1.FileName
End Sub
End Class
-------------------------------------------
thanks in advance...

Regards,
Thiru.S

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sascha Schmidt | last post by:
Hello ! I'm trying to combine an external (not part of the panel) vertical scrollbar (VScrollBar) with a panel in order to scroll the content of the panel vertically using the external ...
1
by: Marco Liedekerken | last post by:
Hi, I want a Horizontal scrollbar to appear in my Panel control when I add new controls to it (when the width is getting too big). The Vertical scrollbar is easy (adding overflow: auto to the...
9
by: Kevin | last post by:
I would like to print the panel control. The panel controls contains images and lables. If i can capture as image i can use it for other purposes like Zooming etcc.. Any body have any idea...
2
by: Carl Gilbert | last post by:
Hi I am looking for either a component or technique to allow me to do the following: * Provide a panel with a background image * Resize the image to best fit the panel to maintain aspect...
2
by: Limin | last post by:
I add some picturebox in the listbox as controls like following. Dim myPic as PictureBox 'Init myPic from here '... '... for i=0 to 30 'New picturebox '... 'set mypic property '....
3
by: Nathan | last post by:
Hi, I have a panel on a form that contains a number of controls (all created at design time), so many that the panel has a vertical scrollbar in order to view all of them (panel1.AutoScroll =...
1
by: Larry | last post by:
Dear friends, I am a novice vb.net user and I am seeking some experts advice. I placed a panel control onto a form, set the autoscroll property (of the panel control) to true. Let's say The...
2
by: YYZ | last post by:
I discovered something very interesting today, and it will save me a bunch of time...maybe. If you set Panel1.Autoscroll to true, and have a panel2 inside of it, I can add all sorts of controls...
0
by: Neeraj | last post by:
Hi I have panel and inside the panel i have many picturebox,if number of picturebox increase ,i have set panel's autoscroll property to true,but as and when i click on any of the picturebox ,i...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.