Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.