Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all.
I am not sure I should be asking this question here but since it is somewhat related to Excel here it goes : I have created a Static Window via the "CreateWindowEx" API and placed it floating over a worksheet Cell... With some tweaking and changing some Styles this Static window now works and looks just fine. However, what I now need is to be able to change is its BackColor after it's been created. I have tried the "SetBckColor" API, Sending as well as trapping the "WM_CTLCOLORSTATIC" Window Message among other things but just can't succeed to change the backcolor of this newly created Static Window :( I googled for an answer but no luck . Anyone here has an answer to this one ? Thank you. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am sure it must be possible, but can't you achieve the same simpler with a
UserForm? RBS "RAFAAJ2000" wrote in message ... Hi all. I am not sure I should be asking this question here but since it is somewhat related to Excel here it goes : I have created a Static Window via the "CreateWindowEx" API and placed it floating over a worksheet Cell... With some tweaking and changing some Styles this Static window now works and looks just fine. However, what I now need is to be able to change is its BackColor after it's been created. I have tried the "SetBckColor" API, Sending as well as trapping the "WM_CTLCOLORSTATIC" Window Message among other things but just can't succeed to change the backcolor of this newly created Static Window :( I googled for an answer but no luck . Anyone here has an answer to this one ? Thank you. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Smissaert .
No . I can't use a UserForm as I would need to reduce its Width to macth that of the underlying Worksheet Cell. Apparently, an XL Userform Width can't be reduced below a certain level even after removing its title bar, caption and changing other of its Styles. I have already tried doing this via various APIs but failed ! I hope I am wrong though in which case I would definitely use a UserForm for this instead of a Static Window. I can't beleive that such seemingly easy thing ie: Simply setting the BackColor of a Window programatically can be that difficult !!!! I hope someone knows the answer to this one. Regards. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK, if you post the code you have sofar in the NG:
microsoft.public.vb.winapi and/or microsoft.public.vb.general.discussion then I am sure somebody will tell you how to set the background color. RBS "RAFAAJ2000" wrote in message ... Thanks Smissaert . No . I can't use a UserForm as I would need to reduce its Width to macth that of the underlying Worksheet Cell. Apparently, an XL Userform Width can't be reduced below a certain level even after removing its title bar, caption and changing other of its Styles. I have already tried doing this via various APIs but failed ! I hope I am wrong though in which case I would definitely use a UserForm for this instead of a Static Window. I can't beleive that such seemingly easy thing ie: Simply setting the BackColor of a Window programatically can be that difficult !!!! I hope someone knows the answer to this one. Regards. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help window setting workbook collapse | Excel Discussion (Misc queries) | |||
Setting the zoom size of a new window from 100% to 75% | Excel Discussion (Misc queries) | |||
Window setting | Setting up and Configuration of Excel | |||
Setting to Keep a Spreadsheet in Front Window | Excel Worksheet Functions | |||
What is the setting to have more than one Excel Window? | Setting up and Configuration of Excel |