How do I do this..? - Printable Version +- BP Forums (https://bpforums.info) +-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55) +--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56) +---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8) +----- Forum: Programming Help (https://bpforums.info/forumdisplay.php?fid=9) +----- Thread: How do I do this..? (/showthread.php?tid=710) |
How do I do this..? - Ecnarf - 12-06-2012 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. Re: How do I do this..? - Derek275 - 12-09-2012 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. |