Results 1 to 6 of 6

Thread: Someone Help me in Zooming my Form!!

Hybrid View

  1. #1
    Junior Member
    Join Date
    Jun 2006
    Posts
    21

    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:
    1. ImageBox.Height = ImageBox.Height/2
    2. ImageBox.Width = ImageBox.Width/2

    and then to maximise it again

    VB Code:
    1. ImageBox.Height = ImageBox.Height*2
    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:
    1. Circle.Radius = Circle.Radius/2

    if it uses the X1-X2, Y1-Y2 method, i would think you need something like this:

    VB Code:
    1. Circle.X2 = (Circle.X1 + Circle.X2) / 2
    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

  2. #2

    Thread Starter
    Registered User
    Join Date
    May 2006
    Posts
    15

    Exclamation 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

  3. #3
    Addicted Member
    Join Date
    Apr 2006
    Location
    USA
    Posts
    207

    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]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width