Form总共有七种不同的边界风格让你设置,你可以在设计时刻也可以运行时通过代码动态的来设置它.这七种边界风格分别是:
None (System.Windows.Forms.FormBorderStyle.None )
Fixed 3D (System.Windows.Forms.FormBorderStyle.Fixed3D)
Fixed Dialog (System.Windows.Forms.FormBorderStyle.FixedDialog)
Fixed Single(System.Windows.Forms.FormBorderStyle.FixedSingle)
Fixed Tool Window(System.Windows.Forms.FormBorderStyle.FixedToolWindow)
Sizable(System.Windows.Forms.FormBorderStyle.Sizable)
Sizable Tool Window
(System.Windows.Forms.FormBorderStyle.SizableToolWindow)
在设计方式下在VS.NET IDE的 Properties window中设置FormBorderStyle属性就可以了.
在运行方式下你可以用代码来完成:
DlgBx1.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
这七种边界类型VB6中就有,没有什么大的变化,运行方式下你需要对照不同的枚举变量进行设置