I am working on a vb6 to vb
.net migration project using VS 3.5. In my application, there is .resx file and some icons are there in this file (eg: icoIN,icoUS etc). On click of a checked listbox (which is filled with country names), the particular country flag should be displayed on a picture box control. The image of country flag is taken from the .resx file.I tried with the following code.
Dim iconStream As Stream = Nothing
Dim bmp As Bitmap = Nothing
'lstcountries is the checkedlistbox and imgcountry is the picturebox
If lstcountries.getitemchecked(EventArgs.index) Then
imgcountry.visible = True
iconStream = System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceStream("icoIN")
bmp = New Bitmap(iconStream)
imgcountry.image = bmp
Catch ex As Exception
but the iconstream is returning an empty value and the picture box not displaying any image. Can anybody help me on this issue.
Any help appreciated.