Results 1 to 7 of 7

Thread: Screen Saver in picturebox control

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 1999
    Posts
    1

    Post

    I need to know how to program a picturebox control to view a scaled down preview of a selected screen saver.

  2. #2
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    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.

  3. #3
    Addicted Member CodeRonin's Avatar
    Join Date
    Jul 2002
    Location
    Vienna, Austria
    Posts
    233

    Does that mean...

    ...I could even use animated gif's or videos in a picture box?
    Code Ronin

  4. #4
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    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.

  5. #5
    Addicted Member CodeRonin's Avatar
    Join Date
    Jul 2002
    Location
    Vienna, Austria
    Posts
    233

    Yeah

    Thank you
    Code Ronin

  6. #6
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    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.

  7. #7
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    Bad news, sorry

    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width