Imports System.Drawing
Imports System.Windows.Forms
Public Class Form1 : Inherits Form
Public Shared Sub Main()
Dim frm As New Form1()
Application.Run(frm)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
With Me
.BackColor = Color.Gray
.ForeColor = Color.Red
.Text = "The With Statement"
.Enabled = True
.TopMost = True
.MinimizeBox = False
For Each ctrl As Control In .Controls
With ctrl
.BackColor = SystemColors.Window
.AutoSize = False
.Cursor = Cursors.Hand
End With
Next
End With
End Sub
End Class