how do i put an image into a program
i need to put an image into my program for a moving game or just for fun, i want to make a mini game where a ball collect coins and if it collects all the coins then it moves to the next level
Please help
4 Replies
what do u mean by putting it into the program?
there is for example stuff to embed it into ur assembly, so that u would end up with one executable/dll instead of having 2 files (the image and the other).
the other side is how to display it, that highly depends on ur program (is it a web project where u just provide an endpoint to download it, are using a GUI framework? if yes, which? the commonly used are WinForms, WPF, MAUI and AvaloniaUI as far as i know)
It needs to be in C#, and i mean displaying it in the program, whats a gui framework i think im using console app, and it needs to be in vs code only
GUI stands for graphical user interface (so like the explorer, notepad, calculator and so on), basically these windows with buttons and so on.
a console app isnt really suited for displaying images, as that is completely text based.
(everything i mentioned so far is about using C# btw, but dont get confused with what i mentioned, im trying to figure out what exactly u want to achieve)
for a simple option you probably want to use windows forms with an imagebox