Results 1 to 5 of 5

Thread: form help

  1. #1
    Join Date
    Aug 2009
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default form help

    How do you have a picture for the background of your form?

    and is it possible to have some of the backgorund transparent?

  2. #2
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It explains it very well in MasterKill's BIG form tutorial:

    http://www.villavu.com/forum/showpost.php?p=520209

    What it says:

    Add a TImage variable to your script to hold the picture:

    Var
    Image1: TImage;
    b, w, h: Integer;


    Then here's the code you use:

    SCAR Code:
    Image1 := TImage.Create(FrmDesign);
      Image1.Parent := FrmDesign;
      Image1.Left := 20;
      Image1.Top := 20;
      Image1.Width := {width of your image};
      Image1.Height := {height of your image};
      b := loadbitmap({Location of your file as a string! (C:\Program Files\?? ect...});
      getbitmapsize(b, w, h);
      copycanvas(getbitmapcanvas(b), Image1.canvas, 0, 0, w, h, 0, 0, w, h);

  3. #3
    Join Date
    Aug 2009
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wouldnt that only be usefull for a banner?

  4. #4
    Join Date
    Oct 2006
    Posts
    500
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nope, works just as well for a background.

    Edit: I think for transparency it's:

    Code:
     Form1.Brush.Style:=bsClear;
     Form1.BorderStyle:=bsNone;
    Although I don't think it works to well. Give it a try.
    Last edited by Rick; 08-21-2009 at 10:42 AM.

  5. #5
    Join Date
    Aug 2009
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok well ill see if it works and post problems

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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