Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I do this..?
#1
Ok so what I am trying to do is basically if a picturebox = a certain image then it will or wont do certain things depending on its image. I am making a custom UI for my program as I usually do but, I have never done what I am trying now. I am making some nice custom tabs but, would like it so they can tell which one is selected if they are over the one that isn't selected and are about to select it or if its just plain and not selected at all.
#2
The easiest way to do this, in my opinion, is to add the image as a reference to the actual program. You would click Project, go to 'My Project's Properties'. Go to references, and drag the image from your Windows Explorer into the white space. Now, it can be accessed like this:
Code:
My.References.image.png
*

And then to do what you need you would do something like this:

Code:
if pictureBox1.Image == My.References.image.png
*

*This might work, I haven't done much work with this kind of coding. You would have two assign the image through the 'My References' option, though I think. Hope this helps and hopefully Brandon or Snake Eyes can come help you with more specifics in case I screwed up.


Forum Jump:


Users browsing this thread: 1 Guest(s)