C
C#•2y ago
Nightwalk

How to make an image bounce around the screen like a screensaver?

I'm trying to make a program for a friend which has an image that moves around the screen and bounces off from the sides. The problem is that I have no idea how to do this or to even start trying to make it happen. Does anyone have any pointers?
18 Replies
Jimmacle
Jimmacle•2y ago
well, first you'll need a program that displays an image then you need to figure out how to move the image
sibber
sibber•2y ago
borederless layered window
Jimmacle
Jimmacle•2y ago
then figure out how to change its direction when it hits an edge
Nightwalk
NightwalkOP•2y ago
In that order? 🤔
Jimmacle
Jimmacle•2y ago
i mean, you asked for pointers
sibber
sibber•2y ago
ideally
Jimmacle
Jimmacle•2y ago
i'd say that's a reasonable order if you have no idea where to start
Nightwalk
NightwalkOP•2y ago
Makes sense, thanks
Jimmacle
Jimmacle•2y ago
it can of course be broken down into even smaller tasks but that's the case with any program and is what programming skill boils down to, your ability to break a big problem into small ones
Nightwalk
NightwalkOP•2y ago
So I assume I need to use Windows Forms App template for this on Visual Studio?
Angius
Angius•2y ago
Or WPF
Jimmacle
Jimmacle•2y ago
you could, that's not the only GUI framework for .NET and is realistically a bad choice for a serious application but for this project it's fine
Nightwalk
NightwalkOP•2y ago
I see, is there a list somewhere of all the different commands for this purpose so I can look up what exists and what can be done?
Jimmacle
Jimmacle•2y ago
yes, google specifically "<x> documentation"
Nightwalk
NightwalkOP•2y ago
alright, thanks!
Mayor McCheese
Mayor McCheese•2y ago
Breaking the chrome on winforms is ( used to be? ) challenging.
sibber
sibber•2y ago
nah its just a couple of style flags
Jester Spoopy
Jester Spoopy•2y ago
wpf should be easy. if you can turn it into a popup window (which is a borderless window) and resize it to the size of the screen

Did you find this page helpful?