none
Overriding System Colors

    Question

  • Is it possible to have a private theme that is only used by one application?

    I have a requirement to set the colors of elements that are not exposed through their property sheet.  For example the color of a forms border and the color of the title bar.

    I know you can change these by using the SystemsColor class but that changes them for all applications.

    Is it possible to have a private theme?


    http://www.saberman.com

    Wednesday, February 22, 2012 3:23 AM

All replies

  • Is it possible to have a private theme? 

    No. (sorry)

    But you can set the form's border to "none" and put your own box around it that looks like a border.

    You can put a box at the top of the form that looks like a titlebar. you can put minimize maximize and close buttons on this (fake) titlebar. 

    You can move forms around by it, and even resize the form with lots and lots of custom code on certain mouse events You should google that.

    hth

    roger

    • Proposed as answer by Dirk Goldgar Thursday, February 23, 2012 7:09 PM
    • Unproposed as answer by saberman Saturday, February 25, 2012 6:51 AM
    Thursday, February 23, 2012 12:52 PM
  • This is a "feature" which is the way Microsoft refers to bugs.  But it is not a solution.  It is clear that the color of the border should have been a property that was under the control of the deveoperl but Microsoft -- in its never ending campaign to protect the user from themself -- decided (without any extenal input) that this was one more item better left to the Empire to control.

    http://www.saberman.com

    Saturday, February 25, 2012 6:55 AM
  • The fact that you don't like the way Windows is designed is not a reason to call it a bug.  In Windows, system colors are set at the system level, not at the application level or form level.  You want the application to be able to specify its own color palette?  Fine, that could be a desirable feature, but the absence of a feature is not a bug.

    Roger told you how to, in effect, implement this missing feature on your own.  I think it's a shame that you won't give him credit for answering your question (is it possible...?) *and* telling you how to accomplish your design goals.


    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    Sunday, February 26, 2012 1:12 AM
  • Roger told you how to, in effect, implement this missing feature on your own.  I think it's a shame that you won't give him credit for answering your question (is it possible...?) *and* telling you how to accomplish your design goals.


    I asked how to set the color of a form's border.  Rolling your own custom form and handling all of the events associated with that is not an answer.  Do you realize how much code has to be writen because Microsoft failed to expose a form's border color and titlebar color or at least make them setable via the SendMessage API?

    http://www.saberman.com

    Sunday, February 26, 2012 3:02 AM
  • Not to roast you for asking this question, but why do you care what the border color is?

    If you want to write a totally controlable application you should be doing it in C#, C++, Java or whatever. If you want to take advantage of Access as a RAD environment then you will have to give up some minor inconviniences.


    Bill Mosca
    http://www.thatlldoit.com
    http://tech.groups.yahoo.com/group/MS_Access_Professionals

    Sunday, February 26, 2012 3:46 AM
  • Not to roast you for asking this question, but why do you care what the border color is?

    If you want to write a totally controlable application you should be doing it in C#, C++, Java or whatever. If you want to take advantage of Access as a RAD environment then you will have to give up some minor inconviniences.

    This is for a shrinkwrapped retail application. 


    http://www.saberman.com

    Sunday, February 26, 2012 7:31 AM
  • Alright Stewart,

    You're coming across as a bit of a crybaby who wants his cake (a powerful database backend and RADD system, with FREE redistribution rights) and to eat it (why can't I set any little thing I want at any time without any work or any understanding of how an OS and a GUI function??)

    Believe me I written my share of rants against M$ and the occasional bug. (if IsDragging = true then  Screen.MousePointer = 9 and IsDragging  IS true and Screen.MousePointer comes up zero, THAT's a bug.) Allowing the enduser to set his own colors is not a bug.

    Your choice is simple. Go work in another environment that lets you control form border color, and write your own SQL server, or use Access and work your around this minor inconvenience.  Actually all the code for this has been written you just have to google it.

    It should no trouble at all for anyone who calls themselves an "expert" at Access. (BTW shouldn't an expert have known this?)

    One more thing, I wouldn't post links to that website if I were you, it looks like it was made in 1996. (oh wait, your using frames,  make that 1998)


    • Edited by Roger23434 Monday, February 27, 2012 1:57 PM
    • Proposed as answer by Douglas J Steele, MVP Monday, February 27, 2012 3:26 PM
    • Unproposed as answer by saberman Monday, February 27, 2012 4:05 PM
    Monday, February 27, 2012 12:14 PM
  • Come to think of it, I don't remember ever seeing a Windows application that let you set the border color of a form. Do you have an example of one?

    Bill Mosca
    http://www.thatlldoit.com
    http://tech.groups.yahoo.com/group/MS_Access_Professionals

    Monday, February 27, 2012 3:05 PM
  • It should no trouble at all for anyone who calls themselves an "expert" at Access. (BTW shouldn't an expert have known this?)

    While it is not a problem to create a custom form that allows the border to be controlled it requires it requires intercepting Windows messages and handling callbacks.  A significant amount of code and risk to overcome a deficiency in the basic design of the form.

    One more thing, I wouldn't post links to that website if I were you, it looks like it was made in 1996. (oh wait, your using frames,  make that 1998)

    The web site serves its purpose -- which is not to use eye canday and dancing elephants to cover the lack of infomation on a web site.


    http://www.saberman.com

    Monday, February 27, 2012 3:52 PM