Results 1 to 4 of 4

Thread: Repeating bg of a Picturebox

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    69

    Question Repeating bg of a Picturebox

    Ok I want a simple image that I have to repeat as a title bar (of an app, but I want to use a picturebox, because I'll use api calls to round of the corners.

    The image should repeat as would doing the following css equivilent:
    background: url(whatever.gif) repeat-x #000;

    I'm using this to create a custom skin for my app.

    Thanks!
    Last edited by solinent; Apr 25th, 2006 at 03:42 PM.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,502

    Re: Repeating bg of a Picturebox

    If you load the picture into one PictureBox, you can then copy it (repeated) to another (larger) PictureBox by simply using PaintPicture in a loop - specifying the X and Y positions where you want to draw the picture.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    69

    Re: Repeating bg of a Picturebox

    Would this use more resources, or just making a large image?

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,502

    Re: Repeating bg of a Picturebox

    It would use marginally more resources, but only enough for the source picture - so if your picture is 20k, you will use 20k extra memory (plus a little for the control).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width