Public Class frmXray 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 '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 picXray As System.Windows.Forms.PictureBox Friend WithEvents btnOK As System.Windows.Forms.Button Friend WithEvents imlXrays As System.Windows.Forms.ImageList Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container Me.picXray = New System.Windows.Forms.PictureBox Me.btnOK = New System.Windows.Forms.Button Me.imlXrays = New System.Windows.Forms.ImageList(Me.components) Me.SuspendLayout() ' 'picXray ' Me.picXray.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.picXray.Location = New System.Drawing.Point(16, 16) Me.picXray.Name = "picXray" Me.picXray.Size = New System.Drawing.Size(256, 240) Me.picXray.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage Me.picXray.TabIndex = 0 Me.picXray.TabStop = False ' 'btnOK ' Me.btnOK.Location = New System.Drawing.Point(72, 272) Me.btnOK.Name = "btnOK" Me.btnOK.Size = New System.Drawing.Size(128, 32) Me.btnOK.TabIndex = 1 Me.btnOK.Text = "OK" ' 'imlXrays ' Me.imlXrays.ImageSize = New System.Drawing.Size(256, 256) Me.imlXrays.TransparentColor = System.Drawing.Color.Transparent ' 'frmXray ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(288, 318) Me.Controls.Add(Me.btnOK) Me.Controls.Add(Me.picXray) Me.Name = "frmXray" Me.Text = "frmXray" Me.ResumeLayout(False) End Sub #End Region Private Sub frmXray_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim i As Integer For i = 1 To 4 imlXrays.Images.Add(Image.FromFile("XRay" & i & ".jpg")) Next End Sub Private Sub frmXray_Activated(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles MyBase.Activated picXray.Image = imlXrays.Images(Me.Tag) End Sub Private Sub btnOK_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnOK.Click Me.Hide() End Sub End Class