delphi 2005 q - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

delphi 2005 q

how do i make it so i can compile a program that use a background from a file eg, when the program is launched it gets bg.bmp and uses it as a background, how would i go about doing this?

Comments

  • zibadianzibadian Posts: 6,349Member
    : how do i make it so i can compile a program that use a background from a file eg, when the program is launched it gets bg.bmp and uses it as a background, how would i go about doing this?
    :
    Place a TImage on your form, behind all the other controls. Then in the TForm.OnCreate(), call the TImage.Picture.LoadFromFile() method to load the image.
  • lukestar234lukestar234 Posts: 3Member
    i have tried doing it that way but now i have the idea that i use a combo box to select the background im planning to have about 4-5 seperate backgrounds how would i go about do this?
  • GaashiusGaashius Posts: 349Member
    : i have tried doing it that way but now i have the idea that i use a combo box to select the background im planning to have about 4-5 seperate backgrounds how would i go about do this?
    :
    You can use TComboBox to do this
    [code]
    ...
    TImage.picture.loadfromfile(combobox1.items[combobox1.itemindex]);
    ...
    [/code]

    ****************
    Any questions? Just ask!

    :-) [b][blue]GAASHIUS[/blue][/b] :-)


Sign In or Register to comment.