如何在 VB 中将表单定位到屏幕的顶部中心

How do I position a form to be top centre of the screen in VB

我想要一个工具栏样式的应用程序,它将位于屏幕顶部 - 中间,但不确定使用什么代码来自动实现这一点。

没有客户职位选项 - 就像过去的 VB 天一样。有人可以帮助我吗?

在Form_Load中添加:

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    CenterToScreen()
    Top = 0
End Sub