Hi everyone, on Visual Studio from the project properties page I had the possibility to import different types of files which are then incorporated into the executable after compilation. I can recall these files from the script to load a ".png" image into a PictureBox or reproduce sounds etc.
My questions are as follows:
1). How can I do this same operation in Gambas 3, so that these files are incorporated into my compiled application?
2). How can I load a ".png" located inside my project into a PictureBox?
Thank you all
Import multimedia files (.png, .mp3) into the project
- cogier
- Site Admin
- Posts: 1127
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Import multimedia files (.png, .mp3) into the project
Place the files you want in the application's folder (From the menu Tools > Browse project..)How can I do this same operation in Gambas 3, so that these files are incorporated into my compiled application?
You can add it in the IDE through the PictureBox property Picture or if the picture is in the application folder: -How can I load a ".png" located inside my project into a PictureBox?
PictureBox1.Picture = Picture["MyPict.png"]
See the 'no code used' example attached.
Re: Import multimedia files (.png, .mp3) into the project
Thanks for the information, after inserting the various files into the project, by doing some tests I understood that to load an image I just need to use:
Code: Select all
PictureBoxName.Picture = Picture.Load("Hours_CircleProgress/Hours_CircleProgress_" & 1 & ".png")