Transparent Window in REALbasic line

In this extremely quick tutorial we will learn how can we create a transparent Window in REALbasic on Mac OS. Watch it, learn it, enjoy it!

Transparent Window

To make our Window transparent simply go to the code editor then to Event Handlers Sub Open () and use this function declare. And this way we will have a nice looking transparent Window1 on our Mac OS.

1
2
3
Declare Function SetWindowAlpha Lib "Carbon" (inWindow As WindowPtr, inAlpha As single) as integer
 
call SetWindowAlpha(Window1, .67) // (name of window, percent of visibility)

Author: Jakub Pawlak

I'm interested in all. Currently working on the development of TUTSPOLIS and I hope that in near feature the project will be successful.

5 Responses to “Transparent Window in REALbasic”

  1. Jakub Pawlak says:

    On Windows you can try to use something like this:

    Dim i As Integer = 255 * alpha

    Declare Sub SetLayeredWindowAttributes Lib “user32″ (hwnd As Integer, thecolor As Integer, bAlpha As integer, alpha As Integer)

    SetLayeredWindowAttributes(w.WinHWND, 0 , i, LWA_ALPHA)

  2. Ricky says:

    Does this work for windows too?

  3. Jakub Pawlak says:

    Ricky you must check it. I don’t have now a REALbasic for Windows, my trial version expired.

  4. Vit says:

    Also you can find example of window transparency for Mac/Windows in RealBasic examples folder Examples/Declares/External Methods.rbp.

Leave a Reply

Copyrights (c) TUTSPOLIS | Powered by Wordpress MU | Inspired at Elegant Themes designed by qbap (HTML5 & CSS3)