Click here to Skip to main content
15,886,842 members
Articles / Programming Languages / Visual Basic

Color Grabber

Rate me:
Please Sign up or sign in to vote.
2.15/5 (8 votes)
19 Feb 2010CPOL1 min read 26.5K   272   12  
A utility to catch a color from the desktop
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Main
   Inherits System.Windows.Forms.Form

   'Form overrides dispose to clean up the component list.
   <System.Diagnostics.DebuggerNonUserCode()> _
   Protected Overrides Sub Dispose(ByVal disposing As Boolean)
      Try
         If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
         End If
      Finally
         MyBase.Dispose(disposing)
      End Try
   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.
   <System.Diagnostics.DebuggerStepThrough()> _
   Private Sub InitializeComponent()
      Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Main))
      Me.PictureBox1 = New System.Windows.Forms.PictureBox
      Me.btnSelect = New System.Windows.Forms.Button
      Me.btnQuit = New System.Windows.Forms.Button
      Me.lblBlue = New System.Windows.Forms.Label
      Me.lblGreen = New System.Windows.Forms.Label
      Me.lblRed = New System.Windows.Forms.Label
      Me.lblLong = New System.Windows.Forms.Label
      Me.lblHtml = New System.Windows.Forms.Label
      Me.lblLong2 = New System.Windows.Forms.TextBox
      Me.lblRed2 = New System.Windows.Forms.TextBox
      Me.lblGreen2 = New System.Windows.Forms.TextBox
      Me.lblBlue2 = New System.Windows.Forms.TextBox
      Me.lblHtml2 = New System.Windows.Forms.TextBox
      CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
      Me.SuspendLayout()
      '
      'PictureBox1
      '
      Me.PictureBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
                  Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
      Me.PictureBox1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
      Me.PictureBox1.Location = New System.Drawing.Point(13, 13)
      Me.PictureBox1.Name = "PictureBox1"
      Me.PictureBox1.Size = New System.Drawing.Size(181, 70)
      Me.PictureBox1.TabIndex = 0
      Me.PictureBox1.TabStop = False
      '
      'btnSelect
      '
      Me.btnSelect.BackColor = System.Drawing.SystemColors.Control
      Me.btnSelect.Cursor = System.Windows.Forms.Cursors.Default
      Me.btnSelect.ForeColor = System.Drawing.SystemColors.ControlText
      Me.btnSelect.Location = New System.Drawing.Point(18, 240)
      Me.btnSelect.Name = "btnSelect"
      Me.btnSelect.RightToLeft = System.Windows.Forms.RightToLeft.No
      Me.btnSelect.Size = New System.Drawing.Size(65, 21)
      Me.btnSelect.TabIndex = 14
      Me.btnSelect.Text = "GO!"
      Me.btnSelect.UseVisualStyleBackColor = False
      '
      'btnQuit
      '
      Me.btnQuit.BackColor = System.Drawing.SystemColors.Control
      Me.btnQuit.Cursor = System.Windows.Forms.Cursors.Default
      Me.btnQuit.ForeColor = System.Drawing.SystemColors.ControlText
      Me.btnQuit.Location = New System.Drawing.Point(104, 240)
      Me.btnQuit.Name = "btnQuit"
      Me.btnQuit.RightToLeft = System.Windows.Forms.RightToLeft.No
      Me.btnQuit.Size = New System.Drawing.Size(65, 21)
      Me.btnQuit.TabIndex = 13
      Me.btnQuit.Text = "&Quit"
      Me.btnQuit.UseVisualStyleBackColor = False
      '
      'lblBlue
      '
      Me.lblBlue.BackColor = System.Drawing.SystemColors.Control
      Me.lblBlue.Cursor = System.Windows.Forms.Cursors.Default
      Me.lblBlue.ForeColor = System.Drawing.SystemColors.ControlText
      Me.lblBlue.Location = New System.Drawing.Point(10, 176)
      Me.lblBlue.Name = "lblBlue"
      Me.lblBlue.RightToLeft = System.Windows.Forms.RightToLeft.No
      Me.lblBlue.Size = New System.Drawing.Size(73, 17)
      Me.lblBlue.TabIndex = 20
      Me.lblBlue.Text = "Blue"
      '
      'lblGreen
      '
      Me.lblGreen.BackColor = System.Drawing.SystemColors.Control
      Me.lblGreen.Cursor = System.Windows.Forms.Cursors.Default
      Me.lblGreen.ForeColor = System.Drawing.SystemColors.ControlText
      Me.lblGreen.Location = New System.Drawing.Point(10, 150)
      Me.lblGreen.Name = "lblGreen"
      Me.lblGreen.RightToLeft = System.Windows.Forms.RightToLeft.No
      Me.lblGreen.Size = New System.Drawing.Size(73, 17)
      Me.lblGreen.TabIndex = 19
      Me.lblGreen.Text = "Green"
      '
      'lblRed
      '
      Me.lblRed.BackColor = System.Drawing.SystemColors.Control
      Me.lblRed.Cursor = System.Windows.Forms.Cursors.Default
      Me.lblRed.ForeColor = System.Drawing.SystemColors.ControlText
      Me.lblRed.Location = New System.Drawing.Point(10, 124)
      Me.lblRed.Name = "lblRed"
      Me.lblRed.RightToLeft = System.Windows.Forms.RightToLeft.No
      Me.lblRed.Size = New System.Drawing.Size(73, 17)
      Me.lblRed.TabIndex = 18
      Me.lblRed.Text = "Red"
      '
      'lblLong
      '
      Me.lblLong.BackColor = System.Drawing.SystemColors.Control
      Me.lblLong.Cursor = System.Windows.Forms.Cursors.Default
      Me.lblLong.ForeColor = System.Drawing.SystemColors.ControlText
      Me.lblLong.Location = New System.Drawing.Point(10, 98)
      Me.lblLong.Name = "lblLong"
      Me.lblLong.RightToLeft = System.Windows.Forms.RightToLeft.No
      Me.lblLong.Size = New System.Drawing.Size(73, 17)
      Me.lblLong.TabIndex = 9
      Me.lblLong.Text = "Long integer"
      '
      'lblHtml
      '
      Me.lblHtml.BackColor = System.Drawing.SystemColors.Control
      Me.lblHtml.Cursor = System.Windows.Forms.Cursors.Default
      Me.lblHtml.ForeColor = System.Drawing.SystemColors.ControlText
      Me.lblHtml.Location = New System.Drawing.Point(10, 199)
      Me.lblHtml.Name = "lblHtml"
      Me.lblHtml.RightToLeft = System.Windows.Forms.RightToLeft.No
      Me.lblHtml.Size = New System.Drawing.Size(73, 17)
      Me.lblHtml.TabIndex = 21
      Me.lblHtml.Text = "Html"
      '
      'lblLong2
      '
      Me.lblLong2.Location = New System.Drawing.Point(87, 95)
      Me.lblLong2.Name = "lblLong2"
      Me.lblLong2.Size = New System.Drawing.Size(100, 20)
      Me.lblLong2.TabIndex = 23
      '
      'lblRed2
      '
      Me.lblRed2.Location = New System.Drawing.Point(87, 121)
      Me.lblRed2.Name = "lblRed2"
      Me.lblRed2.Size = New System.Drawing.Size(100, 20)
      Me.lblRed2.TabIndex = 24
      '
      'lblGreen2
      '
      Me.lblGreen2.Location = New System.Drawing.Point(87, 147)
      Me.lblGreen2.Name = "lblGreen2"
      Me.lblGreen2.Size = New System.Drawing.Size(100, 20)
      Me.lblGreen2.TabIndex = 25
      '
      'lblBlue2
      '
      Me.lblBlue2.Location = New System.Drawing.Point(87, 173)
      Me.lblBlue2.Name = "lblBlue2"
      Me.lblBlue2.Size = New System.Drawing.Size(100, 20)
      Me.lblBlue2.TabIndex = 26
      '
      'lblHtml2
      '
      Me.lblHtml2.Location = New System.Drawing.Point(87, 199)
      Me.lblHtml2.Name = "lblHtml2"
      Me.lblHtml2.Size = New System.Drawing.Size(100, 20)
      Me.lblHtml2.TabIndex = 27
      '
      'Main
      '
      Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
      Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
      Me.ClientSize = New System.Drawing.Size(206, 273)
      Me.Controls.Add(Me.lblHtml2)
      Me.Controls.Add(Me.lblBlue2)
      Me.Controls.Add(Me.lblGreen2)
      Me.Controls.Add(Me.lblRed2)
      Me.Controls.Add(Me.lblLong2)
      Me.Controls.Add(Me.lblHtml)
      Me.Controls.Add(Me.btnSelect)
      Me.Controls.Add(Me.btnQuit)
      Me.Controls.Add(Me.lblBlue)
      Me.Controls.Add(Me.lblGreen)
      Me.Controls.Add(Me.lblRed)
      Me.Controls.Add(Me.lblLong)
      Me.Controls.Add(Me.PictureBox1)
      Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
      Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
      Me.Name = "Main"
      Me.Text = "Color Grabber"
      Me.TopMost = True
      CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
      Me.ResumeLayout(False)
      Me.PerformLayout()

   End Sub
   Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
   Public WithEvents btnSelect As System.Windows.Forms.Button
   Public WithEvents btnQuit As System.Windows.Forms.Button
   Public WithEvents lblBlue As System.Windows.Forms.Label
   Public WithEvents lblGreen As System.Windows.Forms.Label
   Public WithEvents lblRed As System.Windows.Forms.Label
   Public WithEvents lblLong As System.Windows.Forms.Label
   Public WithEvents lblHtml As System.Windows.Forms.Label
   Friend WithEvents lblLong2 As System.Windows.Forms.TextBox
   Friend WithEvents lblRed2 As System.Windows.Forms.TextBox
   Friend WithEvents lblGreen2 As System.Windows.Forms.TextBox
   Friend WithEvents lblBlue2 As System.Windows.Forms.TextBox
   Friend WithEvents lblHtml2 As System.Windows.Forms.TextBox

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Sweden Sweden
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions