Tricky problem (or not?)... Windows with shadow! 
Author Message
 Tricky problem (or not?)... Windows with shadow!

Hi all,

I want to make my forms 'fly' above the desktop, i.e.
I want them to have shadows. Therefore I need to
get the desktop area behind my window (well to be
precise: just the area to the right and below my window
are of interest). I then need to darken these areas
and then draw my window. This has to be done everytime
the user moves the window. Do you get the idea?

How can this be done? Any ideas? Hints? Pointers?

If its too difficult (or impossible) with VB then how can
I do it with VC++?

Thanks,



Sun, 04 Mar 2001 03:00:00 GMT  
 Tricky problem (or not?)... Windows with shadow!
hi,
what about a second form behind your program:
BackColor: Black or something else
BorderStyle: None

cu
Andy



Mon, 05 Mar 2001 03:00:00 GMT  
 Tricky problem (or not?)... Windows with shadow!
Hm, that won't give the effect that the current contents
(bitmap) of the background will be dimmed like in a real
(rendered) shadow... And imagine: the shadow area could
occupy a desktop-icon for example, so I need to darken this
icon ...
I think it's only possible if I grab the background bitmap and
manipulate (darkening, blurring) it. Of course, when the user
moves the window away the original background has to be
restored in the area the shadow just was ...
So, still a problem, huh?!

Thanks anyway for taking your time to think about it!

Stefan.
(... and sorry - English is not my native language ...)

Wonrap schrieb in Nachricht

Quote:
>hi,
>what about a second form behind your program:
>BackColor: Black or something else
>BorderStyle: None

>cu
>Andy



Mon, 05 Mar 2001 03:00:00 GMT  
 Tricky problem (or not?)... Windows with shadow!
How about an idea similar to this one, but instead of the black background
and border style, the shadow window would be completely owner drawn.

The main form would have to be subclassed, so that it would know when it
moved.  It would then move the shadow form acccordingly.

To draw the shadow form, BitBlt the appropriate part of the screen device
context to a memory DC, darken the appropriate bits, and BitBlt it back to
the shadow form.  You would have to make sure that the shadow form stayed
behind the main form for correct clipping.

Whew!!

In other words, yes, it's a tricky problem!

    - Paul

Quote:

>hi,
>what about a second form behind your program:
>BackColor: Black or something else
>BorderStyle: None

>cu
>Andy



Mon, 05 Mar 2001 03:00:00 GMT  
 Tricky problem (or not?)... Windows with shadow!
when you move forms you move a focus rect not the entire form.
You would need to draw outside the form to give this effect.
you do that by getting the dc of the screen and drawing on that
the functions you would need are

getdc(0&)
releasedc
clienttoscreen
bitblt `or whatever drawing function you decide on

alex E

Quote:

>Hi all,

>I want to make my forms 'fly' above the desktop, i.e.
>I want them to have shadows. Therefore I need to
>get the desktop area behind my window (well to be
>precise: just the area to the right and below my window
>are of interest). I then need to darken these areas
>and then draw my window. This has to be done everytime
>the user moves the window. Do you get the idea?

>How can this be done? Any ideas? Hints? Pointers?

>If its too difficult (or impossible) with VB then how can
>I do it with VC++?

>Thanks,




Mon, 05 Mar 2001 03:00:00 GMT  
 Tricky problem (or not?)... Windows with shadow!
Hi Stefan,
i've got visualbasic3 code (runs also with Visual Basic 4/16bit) that dimms an
area of the desktop in three different ways:
light, medium and dark.
this code is not my work and there is no way to refresh the screen in it. if
you want to remove the shadow you have to resize any window to maximum and to
hide the taskbar and show it again.
maybe it is a beginning for you and you can work on it?

cu

Andy



Tue, 06 Mar 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Use of Windows API for shadowing forms?

2. Shadowed windows?

3. SystemParametersInfo and the Windows 2000 Cursor shadow

4. Tricky One...a real Tricky one!!!!!

5. Shadowed Popup Windows

6. ??? Tricky Windows API question

7. (Not too) tricky SELECT statement

8. ListView header "shadow" problem

9. Tricky problem re: returning an item sequence number to a form and to a table

10. tricky problem

11. Tricky problem - Setting the position of an InputBox from VBscript

12. tricky problem in table field access

 

 
Powered by phpBB® Forum Software