Setting Images as Backgrounds for Forms

vb6 Canada
  • 19 years ago

    Does anyone know if it is possible to dynamically resize a picture file, (.bmp, .jpg, .gif) being used as a background for a form, so that it stretches itself appropriately to cover the area of each of the different forms in an application, regardless of their size?


    Bud

  • 19 years ago

    As far as I know, you need to use an Image control for that. Set it's stretch property to true, and then in the Form_Resize event, you can add


    Code:
    Image1.Move 0,0,ScaleWidth,ScaleHeight

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“My definition of an expert in any field is a person who knows enough about what's really going on to be scared.” - P. J. Plauger