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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Change the back color of StatusBar control c#

Change the back color of StatusBar control c#

Scheduled Pinned Locked Moved C#
csharpwinforms
5 Posts 2 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.
  • F Offline
    F Offline
    fady_sayegh
    wrote on last edited by
    #1

    hi to all, does anyone knows how can change the backcolor of a statusbar control with c# winforms application best regards and thanks in advance fady

    I 1 Reply Last reply
    0
    • F fady_sayegh

      hi to all, does anyone knows how can change the backcolor of a statusbar control with c# winforms application best regards and thanks in advance fady

      I Offline
      I Offline
      Ingo
      wrote on last edited by
      #2

      You have to overwrite the paint event and then draw the color onto the graphics object on your own. Greetings, Ingo ------------------------------ A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!

      F 1 Reply Last reply
      0
      • I Ingo

        You have to overwrite the paint event and then draw the color onto the graphics object on your own. Greetings, Ingo ------------------------------ A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!

        F Offline
        F Offline
        fady_sayegh
        wrote on last edited by
        #3

        Thanks to your reply Ingo, how can i fire the paint event ? the statut bar does not have the DrawMode property to set it to 'Variable draw mode'. also, i have no paint event for the statusbar ! best regards and thanks in advance fady

        I 1 Reply Last reply
        0
        • F fady_sayegh

          Thanks to your reply Ingo, how can i fire the paint event ? the statut bar does not have the DrawMode property to set it to 'Variable draw mode'. also, i have no paint event for the statusbar ! best regards and thanks in advance fady

          I Offline
          I Offline
          Ingo
          wrote on last edited by
          #4

          fady_sayegh wrote:

          the statut bar does not have the DrawMode property to set it to 'Variable draw mode'. also, i have no paint event for the statusbar !

          Damn, your right. Well this is a problem. I would derive a new control, but thats a little bit tricky. You have to decide from which class (component, control) and than you must do many things on your own. You could use the handle to call unmanaged api-functions to do the redraw, but I don't know any C# Code. Sorry, my fault. Ingo ------------------------------ A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!

          F 1 Reply Last reply
          0
          • I Ingo

            fady_sayegh wrote:

            the statut bar does not have the DrawMode property to set it to 'Variable draw mode'. also, i have no paint event for the statusbar !

            Damn, your right. Well this is a problem. I would derive a new control, but thats a little bit tricky. You have to decide from which class (component, control) and than you must do many things on your own. You could use the handle to call unmanaged api-functions to do the redraw, but I don't know any C# Code. Sorry, my fault. Ingo ------------------------------ A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!

            F Offline
            F Offline
            fady_sayegh
            wrote on last edited by
            #5

            Thanks any way Ingo

            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