简体   繁体   中英

How to Zoom in and Zoom out in a Panel?

I have a Panel which have

  1. Five labels in it
  2. Two lines one is Vertical and other is Horizontal drawn at run time
  3. An Ellipse drawn at run time
  4. And Some Strings which are also drawn at run time

Now I want to zoom this Panel and every thing in it

How can I solve this problem?

First you have to set the Anchor to all 4 sides for all controls in the panel, resizing the panel will resize the controls also.

Here is the Code.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Panel1.Width = Panel1.Width + 10
    Panel1.Height = Panel1.Height + 10
End Sub

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM