|
-
Oct 14th, 2003, 06:25 AM
#1
Thread Starter
Member
Thanks you very much Tewl.
For others who also need to know how to change the colour of the status bar:
Add reference:
using System.Runtime.InteropServices;
the value for SB_SETBKCOLOR:
int CCM_FIRST = 0x2000;
SB_SETBKCOLOR = (CCM_FIRST + 1);
-
Oct 10th, 2006, 03:17 AM
#2
New Member
Re: Change the background color of a StatusBar [RESOLVED]
hi,
thanks for the code. But I have a problem. In design view it works correct. but when I am running the application, its not working.
my status bar is inside a user control. Can anybody help me ??
Regards,
Reshmi
-
Oct 10th, 2006, 09:23 AM
#3
Re: Change the background color of a StatusBar [RESOLVED]
 Originally Posted by Reshmi
hi,
thanks for the code. But I have a problem. In design view it works correct. but when I am running the application, its not working.
my status bar is inside a user control. Can anybody help me ??
Regards,
Reshmi
Within the Usercontrol, make the access specifier of Statusbar Public, then use the SendMessage API like
Code:
SendMessage UserControlName.ProgressBarName.Handle, SB_SETBKCOLOR, 0, NewBgColor
[Handle] is in C# as [Hwnd] is in VB.
EDIT: Oh, I forgot to add, this is an old thread, so if you have similar question/s, make a seperate/your own thread because it's unlikely that people will open a *RESOLVED* thread.
Last edited by Harsh Gupta; Oct 10th, 2006 at 03:09 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|