Tiling a Bitmap across a forms Background

This sample program show's how to tile a bitmap across a forms background. Any picture can be used - just remember that if you resize the form, you'll need to re-tile the bitmap again.

Screen shot

Download Zipped Project File (3k)



Comments

  • More Dynamic Way

    Posted by Legacy on 11/28/2001 12:00am

    Originally posted by: Andrew Leonard

    Make a new Sub that will perform the same function.
    
    Let's say, ShowBitmap

    Private Sub ShowBitmap

    Dim HorizantalLimit As Integer
    Dim VerticalLimit As Integer
    Dim ii As Integer
    Dim jj As Integer

    HorizantalLimit = Width / Picture1.Width
    VerticalLimit = Height / Picture1.Height

    For ii = 0 To VerticalLimit
    For jj = 0 To HorizantalLimit
    PaintPicture Picture1, jj * Picture1.Width, ii * Picture1.Height, Picture1.Width, Picture1.Height
    Next
    Next

    End Sub

    Call this Sub in Form Load, and also on Form Resize. That way it will automatically load for you, and will resize itself as the dialog is resized.

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

  • Live Event Date: November 13, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT APIs can be a great source of competitive advantage. The practice of exposing backend services as APIs has become pervasive, however their use varies widely across companies and industries. Some companies leverage APIs to create internal, operational and development efficiencies, while others use them to drive ancillary revenue channels. Many companies successfully support both public and private programs from the same API by varying levels …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds