Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the basic properties of VB.NET Dock

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces what the basic attributes of VB.NET Dock are, which can be used for reference by interested friends. I hope you can learn a lot after reading this article.

First of all, let you know about the Anchor properties.

The Anchor property can be set to any combination of Top,Bottom,Left and Right. The default setting is Top,Left. This keeps the top-left corner of the control in the same relative position as the window frame. Set the Anchor property to Top and Bottom to adjust the control vertically to ensure the same distance from the bottom of the window to the bottom of the control.

Me.TextBox1.Anchor = (System.

Windows.Forms.AnchorStyles.

Top Or System.Windows.

Forms.AnchorStyles.Left)

This property can be set to Top,Bottom,Left,Right or Fill. Set it to Top,Bottom,Left or Right to make the control close to the specified edge of the window, or to other controls that have been placed on the edge of the corresponding window. Set the VB.NET Dock property to Fill to adjust the control to fill the entire client area of the window.

Me.Panel1.Dock =

System.Windows.Forms.

DockStyle.Bottom

You can also use the DockPadding object to set the area between the fill window border and the placed control. It has properties corresponding to each window border, which can also be achieved by setting the All property if you want the border to be consistent with each edge.

Me.DockPadding.All = 5

The new control tuning feature in Visual Basic.NET eliminates many of the necessary tuning programs in previous versions of Visual Basic. Most adjustment tasks can be handled by setting new VB.NET Dock and Anchor properties in the window designer without programming at all.

Thank you for reading this article carefully. I hope the article "what are the basic attributes of VB.NET Dock" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report