0

I got problem with resources. My project have 400 small images for status indicator. All images are set in 4 groups (4 different folders). Group are identified by My.Settings.imagevalue parameter. Indicator can give value from 1 to 100. Every new indicator value are displayed in: MainForm.indication_Value.Text .

As I have so many images, I would like to use dll with images as external resource. I have putted all images in 4 dll's, 100 images on each one. On top of DLL structure are RCData, where are set all images by value 1 to 100. I plan to use same DLL's for few apps seamlessly.

I use very simple code on text changes to change image:

    Private Sub preview()
        Dim indication As String
        indication = MainForm.indication_Value.Text & ".jpg"
        Dim resource As String = IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, My.Settings.imagevalue, indication)
        If IO.File.Exists(resource) Then
            indication_preview.Image = Image.FromFile(resource)
        Else
            indication_preview.Image = My.Resources.Resources._error
        End If
    End Sub

How can use images from externa DLL with logic I have created before? I really don't want to write messy code for each image.

Thanks in advance for response!

nuncijs
  • 1
  • 1

0 Answers0