I need to know how to program a picturebox control to view a scaled down preview of a selected screen saver.
Printable View
I need to know how to program a picturebox control to view a scaled down preview of a selected screen saver.
Just doing some grave digging. I wonder if this person will even read this....
Use FindWindow() to get the hWnd of the screensaver, and then SetParent() to put it into the picturebox.
It's kind of neat. You can move it around inside the picturebox, without adding any code of your own.
...I could even use animated gif's or videos in a picture box?
I think there might be a way to use animated gif's, but for movies I think you have to use some form of multimedia control. I'll look it up and post back.
*edit*
SetParent changes the parent value of the window. So if the window is a regular window it becomes a child window of the parent that you specify.
Thank you
New discovery: You can pull a child window out of its parent and make its parent the desktop. So basically you could have a fully coded child window as its own window.
To do this you just have to pass the SetParent() API the desktops hWnd as the parent.
Bad news, sorry
Quote:
If it's an animated GIF then you need the AnimGIF control, but if it's a series of bitmaps, load them into an array of pictureboxes at runtime. Make another picturebox and add a timer...