[racket] Transparent Frame

From: Laurent (laurent.orseau at gmail.com)
Date: Fri Jul 23 12:26:54 EDT 2010

I can't give you a full answer, but maybe this piece of code can get be of
some help:

#lang racket/gui

(define f
  (new frame% [label ""]
               [style '(no-resize-border
                        no-system-menu hide-menu-bar)]

(define cv (new canvas% [parent f]
                [min-width 200]
                [min-height 200]))

(send f maximize #t) ; does not work everywhere
(send f show #t)

It creates a frame with no border, only a canvas inside it.
Draw whatever you like in the canvas by getting the dc% instance.
It is not perfect though, as some window managers put some shade on the
You could maximize the window, but then the user would lose its control over
other windows...


On Fri, Jul 23, 2010 at 17:41, Mathew Kurian <bluejamesbond at gmail.com>wrote:

> I apologize for asking so many questions. I'll take a break after this.
> Well, as you probably noticed, I am very interested in the GUI part of
> every language, including that of scheme.
> Anyways, my question is"'Is there anyway you can make a Scheme Frame
> transparent (inside the frame itself where panels would go)?" I am trying to
> port a game of monopoly in Java to Scheme...just to see how it turns out.
> I don't know if scheme already does this with some extra addons. But, one
> idea which I was thinking was if you could make scheme take a screenshot of
> the background of the desktop (that is behind the frame) and then place that
> image in a certain position inside a panel inside the frame. So thus
> emulating transparency. And make a handler which would, as you move would
> refresh that image and/or move the image location inside the frame.
> Furthermore, just refresh the inside image in the standard 1/30 of second.
> (much like ideaology behind java Robot)
> It would be very useful if you could show me a piece of code that can do
> frame-transparency for scheme?
> (I first sent this to Shriram directly, he said that the reply would be
> faster if i post it here, so i pasted a part of the email)
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100723/6c64743f/attachment.html>

Posted on the users mailing list.