Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42475

Inserting flags based on user-input

$
0
0
I have a small software inside which there is a facility to select which country, Now i have a database of around 150 flags uploaded to My.Resources.

I first started using this code.

Code:

      Select Case TextBoxCountry.Text

              Case is = "England"
              PictureBox.image = My.Resources.England
              Case is = "USA"
              PictureBox.image = My.Resources.USA
              Case is = "Austraila"
              PictureBox.image = My.Resources.Australia

and soo on,

But do i have to do this to all the 150 flags?? isn there a simple way??

I have named all the resource images to the names of their country exactly. Eg: India.jpg, Australia.jpg etc

Cant i use this somehow??

And is there a way that i can make it case-insensitive so that if the user enters it in improper case also it will recognise it??

Thank You.

Viewing all articles
Browse latest Browse all 42475

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>