Lighter/Darker graphics effects (like windows Vista) HowTo?

M

minimega

Hello to all NG,

what I'd like to do in my application is to implement the Lighter/
Darker effect to the full visible display when I open a message box to
interact with user. Try to explain better: suppose I've some forms in
my application, with some controls, lists, buttons, title ecc.. I
display my custom message box asking for some response from user (Ok/
Cancel, Yes/No, ecc..). It will be pretty if the current image visible
on the display will be darked and my custom message box will be
displayed on top with lighter colors (like Windows Vista do).

So, I think, this is the way:
- create my custom message box as a full sized form (240x320) with a
panel that simulate a real form border, title, add 2 buttons, center
label ecc..
- before showing this form I make a snapshot of the current screen to
a memory byte array, analyze array data (using an fastest external C++
library) and change RGB pixels value to a lower or upper brightness;
then paste this new bitmap to the form background image and show the
form

In this way the form will cover all the display area, so user cannot
click under the (smallest) custom message box and I get more
visibility and pretty graphics effect to my custom message box.

How can I do this? My big problem is get a display snapshot. OpenNETCF
gives support, but only saving snaphot to a file. I have to use it
direcly, keeping and modifying it in memory, without use an external
bmp file that will make the effect really slow! Who can help or give
me some suggests?

Thanks
Massimo
 
G

Guest

With a PPC processor this is going to be painfully slow. The OS doesn't
support these effects, so you'll have to do them all manually.
 
M

minimega

With a PPC processor this is going to be painfully slow. The OS doesn't
support these effects, so you'll have to do them all manually.

--
Chris Tacke - Embedded MVP
OpenNETCF Consulting
Managed Code in the Embedded Worldwww.opennetcf.com
--











- Mostra testo tra virgolette -

Yes, I know that I've to do it by myself. However I need help to get
the snapshot to a managed bitmap, can you give me some suggests?

Thanks
 

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