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