Results 1 to 2 of 2

Thread: [RESOLVED] Get color of picture box

  1. #1

    Thread Starter
    Fanatic Member BenJones's Avatar
    Join Date
    Mar 2010
    Location
    Wales UK
    Posts
    814

    Resolved [RESOLVED] Get color of picture box

    Hi I am trying to make a color picker and I added some picture boxes pic0 to pic etc what I am trying to do is find out the color when I click on each picture box. this is the code I have in pic0 click event I also added handles to other picture boxees. bascily I am trying to do like you did in VB6 with control array but I herd you can not do them in .net anyway hope someone can help thanks.

    Code:
        Private Sub Pic0_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Pic0.Click, Pic1.Click
            MsgBox("Here")
        End Sub

  2. #2

    Thread Starter
    Fanatic Member BenJones's Avatar
    Join Date
    Mar 2010
    Location
    Wales UK
    Posts
    814

    Re: Get color of picture box

    Ok no problum guys figured it out

    incase anyone else wants to know.
    put this in the click event of button.

    Code:
            Dim pbox As PictureBox = sender
            Me.BackColor = pbox.BackColor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width