|
-
Jun 28th, 2006, 06:28 PM
#1
Thread Starter
Registered User
-
Jun 28th, 2006, 08:22 PM
#2
Junior Member
Re: Someone Help me in Zooming my Form!!
if i understand what you are trying to do correctly then this should work:
when you press the minimise button the code for the imagebox should be something like this (makes it halfsize)
VB Code:
ImageBox.Height = ImageBox.Height/2
ImageBox.Width = ImageBox.Width/2
and then to maximise it again
VB Code:
ImageBox.Height = ImageBox.Height*2
ImageBox.Width = ImageBox.Width*2
ive never used a circle so im not sure how they work but they would either have a radius, or a X1-X2, Y1-Y2.
If they have a radius control, ie circle.radius then you need to do the same as above:
VB Code:
Circle.Radius = Circle.Radius/2
if it uses the X1-X2, Y1-Y2 method, i would think you need something like this:
VB Code:
Circle.X2 = (Circle.X1 + Circle.X2) / 2
Circle.Y2 = (Circle.Y1 + Circle.Y2) / 2
this will keep the top left corner in the same place and shrink the rest to halfsize
my explanations tend to be longwinded but hopefully you get the idea.
matt
-
Jun 28th, 2006, 11:57 PM
#3
Thread Starter
Registered User
Not this
Thank You Asiladying for your help ;
what i need is not Zooming the Image or the Circle....
But Infact, i do zooming in and out applied on the FORM itself, and so when i make zoom in to it , it will be zoomed with its Components (as circle and imagebox) ........ I hope the help
-
Jun 29th, 2006, 01:31 PM
#4
Addicted Member
Re: Someone Help me in Zooming my Form!!
Hi Captain-alan,
I don't believe you can "zoom the form". You would have to resize and reposition all the controls. There's plenty of messages in this forum about re-sizing controls.
The basics would be like asilaydying said. But instead of using a fixed number I would use a variable. And then just set the number less than one to shrink and greater than one to enlarge.
I.E. width=width*ratio. { ratio=.5 (shrink) ratio=2 (enlarge) }
Keith_VB6
If you have any further questions, just ask.
If this solves things, then please mark the thread resolved.
[Thread Tools] --> [Mark Thread Resolved]
-
Jun 29th, 2006, 07:54 PM
#5
Lively Member
Re: Someone Help me in Zooming my Form!!
Keith is right, there is no zoom command. The only way to zoom is actually to trick the user into thinking they are zooming by manually changing the size and repositioning all of the objects. asilaydying covered the changing size, but remember to move them aswell. For instance, while you do this (zooming out)...
VB Code:
ImageBox.Height = ImageBox.Height/2
ImageBox.Width = ImageBox.Width/2
Also do this...
VB Code:
ImageBox.Left = ImageBox.Left + ImageBox.Width/2
ImageBox.Top = ImageBox.Top + ImageBox.Height/2
EDIT: for my method above, remember to reposition after you resize. If you want to do it the other way add a quarter of the height and width.
-
Jun 30th, 2006, 04:54 PM
#6
Thread Starter
Registered User
Great Thanks
Thank You Guys about your useful Answer
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|