How to Access an Image in the Resources Using VB.Net
Submitted by janobe on Friday, August 31, 2018 - 15:13.
In this tutorial I will show you how to access an image in the resources using vb.net. This method will help you to embed an image from the resources to a picture box. It is very simple and yet very useful. I Hope this tutorial will solve some of your problems.
So let’s get started:
For more question about this article. You can contact me @
Email – [email protected]
Mobile No. – 09305235027 – TNT
FB Account – https://www.facebook.com/onnaj.soicalap
Step 1
Open Microsoft Visual Studio 2015 and create a new windows form application.
Step 2
Go to toolbar and drag a Label, two Button and a PictureBox. Do the form just like shown below.
Step 3
Add two images into the resources. Click Here.Step 4
Click a Login Button to fire theclick event hander
and do the following codes for accessing an image in the resources and embed it into the PictureBox.
- PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
- PictureBox1.Image = My.Resources.login
Step 5
Go to Design views, click a Logout Button to fire theclick event hander
and do the following codes for accessing an image in the resources and embed it into the PictureBox.
- PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
- PictureBox1.Image = My.Resources.logout
Add new comment
- 1554 views