Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. OnSystemColorsChanged never fired?

OnSystemColorsChanged never fired?

Scheduled Pinned Locked Moved C#
helptestingdebuggingbeta-testingquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mike montagne
    wrote on last edited by
    #1

    I'm doing final testing on a library project and have an issue with OnSystemColorsChanged, which I have overridden as follows: protected override void OnSystemColorsChanged( EventArgs e ) { base.OnSystemColorsChanged( e ); if ( MyCondition ) { DoWhatIHaveToDoHere( ); } } My visual control will sometimes paint itself in derivatives of SystemColors.Control, and so I need this override to respond to changes by re-processing whatever color is assigned to it. To test, I've gone into system settings and changed the base color for 3D objects. Colors in many simultaneously opened applications change, but not my control. My problem is that my override is never entered. Is there some further way that we are supposed to register our component with the form or something to get OnSystemColorsChanged to fire? Or is what I am doing to test entry not sufficient to fire the method? (I assume that Trace will enter the method, and that the fact Trace does not enter the method indicates it is not being fired -- besides of course the fact no processing occurs. ) TIA, m

    M 1 Reply Last reply
    0
    • M mike montagne

      I'm doing final testing on a library project and have an issue with OnSystemColorsChanged, which I have overridden as follows: protected override void OnSystemColorsChanged( EventArgs e ) { base.OnSystemColorsChanged( e ); if ( MyCondition ) { DoWhatIHaveToDoHere( ); } } My visual control will sometimes paint itself in derivatives of SystemColors.Control, and so I need this override to respond to changes by re-processing whatever color is assigned to it. To test, I've gone into system settings and changed the base color for 3D objects. Colors in many simultaneously opened applications change, but not my control. My problem is that my override is never entered. Is there some further way that we are supposed to register our component with the form or something to get OnSystemColorsChanged to fire? Or is what I am doing to test entry not sufficient to fire the method? (I assume that Trace will enter the method, and that the fact Trace does not enter the method indicates it is not being fired -- besides of course the fact no processing occurs. ) TIA, m

      M Offline
      M Offline
      mike montagne
      wrote on last edited by
      #2

      I don't know about the rest of you, but I encounter so many dysfunctionalities in visiting Microsoft sites that there hardly seems any point in trying. I have to log in to post (but I already logged in). I try to log in again, I'm told I have to enable cookies (but cookies are enabled). I try to post or send feedback, and I'm told I need to log in. I try to log in, but I'm told I'm already logged in. This stuff is absolutely ridiculous. In any case, I called and got a special link that was supposed to allow me to post a report without logging in... but it required me to log in as well, and we went around in circles for naught again... BUT... Though all previous searches turned up nothing, I tried my OnSystemColorsChanged search from that page... and I turn up an issue: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=95463 So, although this is not the whole issue, it reports that at one time, though system colors may be reconfigured, the new colors were not assigned to the values representing system colors. MS claims to have been able to reproduce the problem, and to have fixed it. I believe their test situation was not broad enough to verify *also* that OnSystemColorsChanged is entered, because my testing shows no entry into this event handler whatsoever. Same problem with OnEnabledChanged, which I was able to work around by writing a new Enabled property. OnSystemColorsChanged however provides no such opportunity, because of course we are not assigning to a property to fire the event -- it is a system event, the whole responsibility for which is Microsoft's. Unless I misunderstand that my testing (manually resetting system colors) is somehow (?) insufficient to fire the event (it changes system colors in many other applications), I believe this establishes a compiler issue/bug. If anyone knows any better, I surely would like to hear about it, because this is a very costly issue for us. TIA, m

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups