round window showing video

Just starting out? Need help? Post your questions and find answers here.
fluent
User
User
Posts: 68
Joined: Sun Jan 24, 2021 10:57 am

round window showing video

Post by fluent »

I was wondering, is a round window like the below achievable with purebasic?

Image
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4636
Joined: Sun Apr 12, 2009 6:27 am

Re: round window showing video

Post by RASHAD »

Yes it can be done with PB
Search the forum for x-ray
Quick hack for Windows

Code: Select all

If InitMovie() = 0
  MessageRequester("Error", "Can't initialize movie playback !", 0) 
  End
EndIf  
  If OpenWindow(0, 0, 0, 400, 400, "Magnify", #PB_Window_ScreenCentered|#PB_Window_BorderLess)
     StickyWindow(0, 1)
     Region = CreateEllipticRgn_(100, 100, 300, 300)
     SetWindowRgn_(WindowID(0), Region, #True)
     DeleteObject_(Region)
    MovieName$ = OpenFileRequester("Choose the movie to play", "", "Movie files|*.avi;*.mpg|All Files|*.*", 0)
    If MovieName$
      If LoadMovie(0, MovieName$)
        PlayMovie(0, WindowID(0))
      EndIf
    EndIf 
  
  EndIf
  
  Repeat
    Select WaitWindowEvent(1)
      Case #WM_KEYDOWN
        If EventwParam() = 27
          Quit = 1
        EndIf
    EndSelect
  
Until quit = 1
Egypt my love
fluent
User
User
Posts: 68
Joined: Sun Jan 24, 2021 10:57 am

Re: round window showing video

Post by fluent »

Wow amazing. Thanks!!
Post Reply