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

  • The explosion in mobile devices and applications has generated a great deal of interest in APIs. Today's businesses are under increased pressure to make it easy to build apps, supply tools to help developers work more quickly, and deploy operational analytics so they can track users, developers, application performance, and more. Apigee Edge provides comprehensive API delivery tools and both operational and business-level analytics in an integrated platform. It is available as on-premise software or through …

  • Historically, IT investments were made simply in the interest of increasing competitiveness and with little insight into the hard, fact-based financial case. As organizations worldwide have been forced to tighten belts and slash budgets, management increasingly require financial evidence for sound IT purchases that fully align with business goals and strategies. This webinar defines and describes total cost of ownership - an important metric for assessing and tracking the risks, costs, and benefits of …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds