Page 1 of 1

Simple fullscreen movie

Posted: Fri Jan 02, 2004 9:16 am
by boop64
Code updated for 5.20+

Well, I got bored and was messing around with the playmovie() function to see what funny things i could do with it. I came up with an interesting little program.

There are two window id's you can use in this example to play a movie on. The first one is 'hDesk' this plays the video directly to your desktop giving you a fullscreen video w/o much effort. The second is 'hTray' this one really has no use but it's pretty funny, it will render the video over your tray window. 'hTray' could be used if you wanted to play a joke on a friend or something. Anyway thanks for listening.

Boop64

-----------

Code: Select all

hDesk = GetDesktopWindow_()
hTray = FindWindow_("Shell_traywnd", "")
If InitMovie() = 0
  MessageRequester("Error", "Can't initialize movie playback !", 0)
  End
EndIf

MovieName$ = OpenFileRequester("Choose the movie to play", "", "Movie/Audio files|*.avi;*.mpg;*.asf;*.mp3;*.wav|All Files|*.*", 0)

If MovieName$
  If LoadMovie(0, MovieName$)
    ResizeMovie(0, 0, 0, GetSystemMetrics_(#SM_CXSCREEN), GetSystemMetrics_(#SM_CYSCREEN))
    PlayMovie(0, hDesk)
    
    Repeat
      Delay(1)
    ForEver
  EndIf
EndIf
End

Posted: Fri Jan 02, 2004 12:32 pm
by darklordz
nice effect does movieseek also work?

Posted: Sat Jan 03, 2004 4:54 am
by boop64
All the movie functions should work like normal. It's playing the movie on a windows just as if you created the window your self. So as far as I know movieseek should also work. Again I just did this because I was bored and I saw people were having problems getting fullscreen video. Anyway I hope that helps.

Boop64

Posted: Mon Apr 19, 2004 9:54 pm
by TIGER
And how to close desktop after playing movie ?

And is there is a way to put other media (like images) on desktop ?

Posted: Mon Apr 19, 2004 10:11 pm
by dell_jockey
on Win32: Alt-F4