transparent form

G

Guest

I want to create a transparent form and can write something on it by using Ink.
I try to set form.backcolor = color.transparent, but it dosen't accept.
And everything will be transprent when i use Opacity.
Finally, i try to use transparencykey, but any mouse actions will be
transferred to the windows below the transparent area.
Any solutions? thx
 
G

Guest

if i have a form with opacity = 0 and draw a line on the form,
the line will be invisible. i want the form invisble and the line is visible
so i think opacity doesn't work for my project
 
T

Terry Burns

I'm a little confused as to exactly what problem you are experiencing. I
have not tried this, but I think if the Opacity is set to 0% then the click
events will not be trapped by your form and will be passed to whatever is
underneath, however, you can set the Opacity to 1% and have the form
seemingly appear invisible to your eye and still trap the events.

Can you be more specific about the exact state your project is in with
respect to the problem you are writing about.

Thanks
 
G

Guest

The scenario is, put a peice of glass on the screen, then i can put anything
on the glass and still can see the screen.
The click events will be trapped if i set the Opacity to 1%. but if i draw a
line on the form, the line will be almost invisible too. what i want is, the
form is transparent and the line is opaque.
 
S

Stefan Simek

Hi don,

Please let me know if I'm wrong, but - what you want to do will
effectively prevent the user from interacting with windows under your
form, so why not simply grab the desktop contents (via BitBlt, for
example) and set it as background to your form?

HTH,
Stefan
 
T

Terry Burns

I assume the OP wants to see the real desktop wherever he moves the form. I
was wondering if you set the key transparency to the grey of the form
background color and then used a transparent layered graphic or something to
try and prevent the pass through. I have not tried it, but maybe you could
play with that idea and see if it yeilds any success ?
 
G

Guest

hi Burns,
I have tried it , but still doesn't work.
thx

hi Simek,
yes, the form that i want will prevent the user from interacting with
windows (I can handle these event). It's feasibe by grabbing desktop content
when conten is static.
but still have problem when desktop conten is not static(e.g. playing flash
moving).
Iterative grabbing may work, but it would lead to bad performance.
thx
 
T

Tim Geiges

What you can do to make a form that is transparent or parts of it
transparent, would be to create a bmp file to the size you want your
form to be, all the parts you want to be transparent make (let's say)
"white", then go to your form designer and set the background image of
the form to this new bmp file and the size to the size of the bmp ,
then set the TransparencyKey to "white"(or the exact color you chose to
be transparent, careful if you want to use white later in the form it
will be transparent), also you can set the FormBorderStyle to None so
the user cant resize.

Later you can actually make the background image scale as the user
resizes the window if you so desire
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top