Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发 WinForms 项目。我需要将表单的颜色从白色更改为黑色。
VB代码:
Dim g As Graphics, Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load g= Me.CreateGraphics End Sub
任何想法如何在g实例的方法的帮助下做到这一点?
将 form1.backColor 或类似的设置为您选择的颜色
Form1.backColor = 颜色.黑色
就这么简单...
g.FillRectangle(New SolidBrush(Color.Black), MyBase.ClientRectangle)