Transparent Form: Holes
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Imports System.ComponentModel
Imports System.Drawing.Drawing2D
Imports System.IO
Public Class MainClass
Shared Sub Main()
Dim form1 As Form = New Form1
Application.Run(form1)
End Sub
End Class
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
Friend WithEvents PictureBox3 As System.Windows.Forms.PictureBox
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox
Friend WithEvents PictureBox4 As System.Windows.Forms.PictureBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.PictureBox3 = New System.Windows.Forms.PictureBox()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
Me.PictureBox4 = New System.Windows.Forms.PictureBox()
Me.SuspendLayout()
'
'PictureBox3
'
Me.PictureBox3.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(128, Byte), CType(128, Byte))
Me.PictureBox3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.PictureBox3.Location = New System.Drawing.Point(28, 24)
Me.PictureBox3.Name = "PictureBox3"
Me.PictureBox3.Size = New System.Drawing.Size(76, 76)
Me.PictureBox3.TabIndex = 3
Me.PictureBox3.TabStop = False
'
'PictureBox1
'
Me.PictureBox1.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(128, Byte), CType(128, Byte))
Me.PictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.PictureBox1.Location = New System.Drawing.Point(124, 24)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(76, 76)
Me.PictureBox1.TabIndex = 4
Me.PictureBox1.TabStop = False
'
'PictureBox2
'
Me.PictureBox2.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(128, Byte), CType(128, Byte))
Me.PictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.PictureBox2.Location = New System.Drawing.Point(28, 116)
Me.PictureBox2.Name = "PictureBox2"
Me.PictureBox2.Size = New System.Drawing.Size(76, 76)
Me.PictureBox2.TabIndex = 5
Me.PictureBox2.TabStop = False
'
'PictureBox4
'
Me.PictureBox4.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(128, Byte), CType(128, Byte))
Me.PictureBox4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.PictureBox4.Location = New System.Drawing.Point(124, 116)
Me.PictureBox4.Name = "PictureBox4"
Me.PictureBox4.Size = New System.Drawing.Size(76, 76)
Me.PictureBox4.TabIndex = 6
Me.PictureBox4.TabStop = False
'
'Holes
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(232, 234)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.PictureBox4, Me.PictureBox2, Me.PictureBox1, Me.PictureBox3})
Me.Name = "Holes"
Me.Text = "A Form With Holes"
Me.TransparencyKey = System.Drawing.Color.FromArgb(CType(255, Byte), CType(128, Byte), CType(128, Byte))
Me.ResumeLayout(False)
End Sub
#End Region
End Class
Related examples in the same category