Images that are used alot

  • Thread starter Thread starter Michael Turner
  • Start date Start date
M

Michael Turner

Hi Guys

I have set images which I use all the time in my application, in different
forms, however if I put each of these images as backgrounds they are going
to take up a lot of space is there a way to globaly reference these images
so they take up less space?

Thanks Mike.
 
Michael Turner said:
I have set images which I use all the time in my application, in different
forms, however if I put each of these images as backgrounds they are going
to take up a lot of space is there a way to globaly reference these images
so they take up less space?

You can set up an imagelist that holds the images and can be accessed by all
classes, or add the image as a resource, load it once and then reuse it on
more than one place:

<URL:http://www.google.de/[email protected]>
 
Hi

I'm using these images as backgrounds to panels, I cant seem to set an
imagelist image in the properties is there another way to do it?

Mike.
 
Michael,

The imagelist will fits only images which are maximum 256 by 256 so will
probably not help you for your panels. You have to make an resx file from
your pictures.
Maybe there is a better method however a very easy one is this.

Add a component as item (Solution explorerer, add item component) name it by
instance myImages.vb
Drag on that as much panels as you need pictures and set the background for
every panel, than you can do in your programs

\\\
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim myIm As New MyImages
Me.Panel1.BackgroundImage = myIm.Panel1.BackgroundImage
End Sub
///

I hope this helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top