调色板:点击图任何一个点,取这个点的颜色。
Private Sub FrmSYS_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
PictureBox2.Image = Image.FromFile("" & Application.StartupPath & "\Pic\Selectcolor.bmp")
End Sub
Private Sub PictureBox2_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseDown
Dim bmp As Bitmap
bmp = PictureBox2.Image
If e.X < PictureBox2.Image.Width Then
bmp.GetPixel(e.X, e.Y)
Label79.BackColor = bmp.GetPixel(e.X, e.Y)
End If
End Sub