Discussion:
Paint semitransparent above windows (ghost image)
(too old to reply)
tsadigov
2009-03-10 04:14:01 UTC
Permalink
Hi
I want to paint semitransparent pictures on my screen above everything
I tried to use semi transparent WinForm with topmost set to true
It looked as I wanted, but it was slow and everytime It appeared above a
window that I was working on it accepted the mouse input (not the window
where I work)

So I tried to find a way to make window semitransparent not only visually
but also transparent for user input as though that window is not there and
you can click through it.

I am sure that this is possible because when I load my comp too much it
sometimes does such things, for example the semitransparent image of dragged
files are left on the screen and I can click through them.

So is there anyone who knows how to do such a thing in my code

I use C#.NET
but Im also comfortable whith C++ :)

any comments, any hint and any links are welcome
legalize+ (Richard [Microsoft Direct3D MVP])
2009-03-10 04:32:43 UTC
Permalink
[Please do not mail me a copy of your followup]

DirectX isn't going to help here, because the slow part is GDI and you
can't get away from it in this scenario. There might be a way to make
it work acceptably fast under Vista with the desktop compositing
engine, but I don't know how that's exposed, if at all.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>

Legalize Adulthood! <http://blogs.xmission.com/legalize/>
tsadigov
2009-03-10 13:07:01 UTC
Permalink
Post by legalize+ (Richard [Microsoft Direct3D MVP])
[Please do not mail me a copy of your followup]
DirectX isn't going to help here, because the slow part is GDI and you
can't get away from it in this scenario. There might be a way to make
it work acceptably fast under Vista with the desktop compositing
engine, but I don't know how that's exposed, if at all.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>
Legalize Adulthood! <http://blogs.xmission.com/legalize/>
thanks

even though I dont like it, I can live with such performance
the other problem is more important

I mean I dont want to capture user input

I want the user input to be sent to the windows under my "ghost window".
By the way I still use XP :)

It is not necessary for me to use Window/Form I just want to draw
semitransparent image above my desktop.

Is it possible to show some image without a window, can I bypass Windows and
wright directly to Video Memory

an analogy would be to override OnPaint of windows :) draw an image after
all windows render themselves.
tsadigov
2009-03-10 13:26:01 UTC
Permalink
I remember a sample called Mosquito in th DXSDK but I dont remember exactly
its behaviour(I could not find it and spent bandwidth DX11sdk which doesnt
contain it:( )
Post by legalize+ (Richard [Microsoft Direct3D MVP])
[Please do not mail me a copy of your followup]
DirectX isn't going to help here, because the slow part is GDI and you
can't get away from it in this scenario. There might be a way to make
it work acceptably fast under Vista with the desktop compositing
engine, but I don't know how that's exposed, if at all.
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>
Legalize Adulthood! <http://blogs.xmission.com/legalize/>
tsadigov
2009-05-05 22:44:06 UTC
Permalink
at last I found a way to do it :)
But I didnt use DirectX

If it is interesting to anyone u can look at the axample

http://rapidshare.com/files/215722384/smart2.rar
Post by tsadigov
Hi
I want to paint semitransparent pictures on my screen above everything
I tried to use semi transparent WinForm with topmost set to true
It looked as I wanted, but it was slow and everytime It appeared above a
window that I was working on it accepted the mouse input (not the window
where I work)
So I tried to find a way to make window semitransparent not only visually
but also transparent for user input as though that window is not there and
you can click through it.
I am sure that this is possible because when I load my comp too much it
sometimes does such things, for example the semitransparent image of dragged
files are left on the screen and I can click through them.
So is there anyone who knows how to do such a thing in my code
I use C#.NET
but Im also comfortable whith C++ :)
any comments, any hint and any links are welcome
f***@gmail.com
2009-05-09 03:10:25 UTC
Permalink
Hello, My name is Agustin and I had a few questions about your post
('paint semitransparent above desktop (ghost image)').
I have been looking over a year for a simple app that can load a pic,
display it transparent above windows and allow me to
work on other apps/windows below (ghost image).I found your post and
downloaded your example(smart2file)WOW!
You found a way that works..I have little programming skill and was
wondering if you can make a simple app that can load
a ghost image and position it were you want with chosen transparency
then lock it while working on apps/windows below or through the the
"ghost image".This would be one of a kind app, it would be really
useful. I am willing to help out in any way possible.I am a Digital
artist with raster and vector
skill, I have done logo/icon/gui work for opensource projects, if that
would help at all..Thank you for your time. you can reply back at
( ***@yahoo.com )

Regards, Agustin R
tsadigov
2009-05-09 15:51:01 UTC
Permalink
I'm glad that u liked it
Some ppl said that such function is useless and didn't understand why Im
trying to do this. Actually this is quick and durty implementation , it has
many bugs. I hope I'll have time to write a better implementation.

What u r asking for is very easy to implement(as I understood).

Contact me on my yahoo account for details of what u want.
***@yahoo.com
f***@gmail.com
2009-05-15 17:52:18 UTC
Permalink
I'm not sure if you got the reply by email so I decided to post the
detail here..

Thank you for the opportunity to share that idea.I hope you have the
time to implement
the details.The idea is simple, Basically The app would be able to
load image(s) and display them with
basic settings (Overall transparency,position on screen(x,y),maybe
image scale(x,y),a shortcut key to turn on/off or hide,maybe be able
to load transparent image(s) (.png) format,and open basic image formats
(.bmp,.jpg)) that is basically it..You already have most of this
implemented.
I'm not sure how much work this would take ,but I am sure it is
alot.Hope it isn't to much.Thank you for your time once again..

Regards , Agustin
f***@gmail.com
2009-05-09 03:14:03 UTC
Permalink
Hello, My name is Agustin and I had a few questions about your post
('paint semitransparent above desktop (ghost image)').
I have been looking over a year for a simple app that can load a pic,
display it transparent above windows and allow me to
work on other apps/windows below (ghost image).I found your post and
downloaded your example(smart2file)WOW!
You found a way that works..I have little programming skill and was
wondering if you can make a simple app that can load
a ghost image and position it were you want with chosen transparency
then lock it while working on apps/windows below or through the the
"ghost image".This would be one of a kind app, it would be really
useful. I am willing to help out in any way possible.I am a Digital
artist with raster and vector
skill, I have done logo/icon/gui work for opensource projects, if that
would help at all..Thank you for your time.

Regards, Agustin
tsadigov
2009-05-28 10:09:01 UTC
Permalink
Ithought may be somebody would like such a thing

http://rapidshare.com/files/234155601/smarty.rar

Loading...