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
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