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. Status bar

Status bar

Scheduled Pinned Locked Moved C#
5 Posts 4 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.
  • S Offline
    S Offline
    Sajjad Leo
    wrote on last edited by
    #1

    Hi, I am trying to do code for status bar and i want to add any image in status bar and instruction from keyboard which will be highlighted on status bar like if use CAPS or INSERT from key board. kindly guide me what i have to do and how penal i should be arrange for my task. Thanks

    L 1 2 Replies Last reply
    0
    • S Sajjad Leo

      Hi, I am trying to do code for status bar and i want to add any image in status bar and instruction from keyboard which will be highlighted on status bar like if use CAPS or INSERT from key board. kindly guide me what i have to do and how penal i should be arrange for my task. Thanks

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Use event KeyDown, if for example CapsLock pressed, then set the image in statusbar. For example, you are using ToolStripStatusLabel, then set it to : toolStripStatusLabel1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripStatusLabel1.Image"))); Use the designer, and see the code behind it in ...Designer.cs.

      S 1 Reply Last reply
      0
      • L Lost User

        Use event KeyDown, if for example CapsLock pressed, then set the image in statusbar. For example, you are using ToolStripStatusLabel, then set it to : toolStripStatusLabel1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripStatusLabel1.Image"))); Use the designer, and see the code behind it in ...Designer.cs.

        S Offline
        S Offline
        Sajjad Leo
        wrote on last edited by
        #3

        I want image when form load and i have text like CAPS on status bar it is not highlighted initially but when i pressed caps lock then text on status bar which is CAPS must be highlighted on which event i can do these task. Thanks

        H 1 Reply Last reply
        0
        • S Sajjad Leo

          I want image when form load and i have text like CAPS on status bar it is not highlighted initially but when i pressed caps lock then text on status bar which is CAPS must be highlighted on which event i can do these task. Thanks

          H Offline
          H Offline
          Henry Minute
          wrote on last edited by
          #4

          Take a look at this[^] article from CodeProject. It should help you solve at least part of your problem. Remember! Google is your friend. :)

          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

          1 Reply Last reply
          0
          • S Sajjad Leo

            Hi, I am trying to do code for status bar and i want to add any image in status bar and instruction from keyboard which will be highlighted on status bar like if use CAPS or INSERT from key board. kindly guide me what i have to do and how penal i should be arrange for my task. Thanks

            1 Offline
            1 Offline
            12Code
            wrote on last edited by
            #5

            Here you go, Add images caps_on and caps_off in the resources, then add below code into your form class..

                private bool bCapLock = false;
                protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
                {
                    if (keyData == Keys.CapsLock)
                    {                
                        if (!bCapLock)
                        {
                            toolStripStatusLabel1.Image =  Properties.Resources.caps\_on;
                            bCapLock = true;
                        }
                        else
                        {
                            toolStripStatusLabel1.Image = Properties.Resources.caps\_off;
                            bCapLock = false;
                        }
                    }
                    return base.ProcessCmdKey(ref msg, keyData);
                }
            

            Hope this can help.

            ;)*12Code

            modified on Tuesday, April 7, 2009 10:30 AM

            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