Transparent Background?

This forum is currently in read-only mode.
From the Asset Store
40 Funky tanks PNG transparent in different colours - 2048x2048
  • Sorry to bother the good people of Scirra again ,I want to know if i can create an application or game similar to widgets,For instance like a round desktop clock but the background must be transparent.

  • No.

  • you could do it the way they did before accelerated desktop compositing.

    That is:

    -Window with no frame (no problem!)

    -Drag window to move (events, no problem!)

    -On move, capture background and composite within application (Uhm.. python? :s I'm sure desktop capturing has been discussed before in the forums.)

    That said, capturing background isn't fast, so you shouldn't update each frame. This means that the captured background will not reflect changes until you move the window forcing an update.

  • It's pretty simple from python, but it will require the ctypes library so you'll have to install python to get it to work.

    Add a Window object to your cap and run this at the start of the layout:

    from ctypes import *
    hwnd=Window.AppWindow
    region=windll.gdi32.CreateEllipticRgn(0,0,640,480)
    windll.user32.SetWindowRgn(hwnd,region,0)[/code:36plvr02]
  • Thank you RojoHound,I do have python installed already,Will try out the code and see what happens.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Works like a charm thanks rojohound.

    <img src="http://dl.dropbox.com/u/7658043/Imagppe2.jpg">

  • do share

  • Since your asking so nicely sure ,Here's the cap.

    http://dl.dropbox.com/u/7658043/clock.cap

  • It's pretty simple from python, but it will require the ctypes library so you'll have to install python to get it to work.

    Add a Window object to your cap and run this at the start of the layout:

    from ctypes import *
    hwnd=Window.AppWindow
    region=windll.gdi32.CreateEllipticRgn(0,0,640,480)
    windll.user32.SetWindowRgn(hwnd,region,0)[/code:1jv5c9ha]
    

    Excelent

    thanks for info

    just a question...if i want to make it back after to the 'normal' window form, how do I make?

  • To be able to restore the window change the script to:

    from ctypes import *
    hwnd=Window.AppWindow
    region=windll.gdi32.CreateEllipticRgn(0,0,640,480)
    oldRegion=windll.user32.SetWindowRgn(hwnd,region,0)[/code:297le7j1]
    then later when you want to restore the window shape run this:
    [code:297le7j1]windll.user32.SetWindowRgn(hwnd,oldRegion,0)[/code:297le7j1]
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)