|
I've got the same problem. Does anyone knows how to change the forecolor?
|
|
|
|
|
Hi All,
I have disabled a checkbox however when it's disabled I don't want it to be grayed out I want it to have it's enabled appearance. So instead of gray I whan it to be white.
Unlike TextBoxes when I use the following code the surrounding area of the checkbox and it's text change colour instead of the inside of the checkbox:
oCheckBox.BackColor = Color.White;
Does anyone know how I would go about doing this?
Thanks,
Mel
|
|
|
|
|
I dont think its possible unless you draw your own image on it but thats not good way. However, you can make your own CB using a Button and a Label. Change button background image or color on MouseEnter, MouseLeave, MouseDown and MouseUp.
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi xman
thanks for the idea. Are you suggesting that I make the button appear to look like a checkbox and go from there?
Thanks,
Mel
|
|
|
|
|
yupp, search for checkbox images or just capture 'em from screen...
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
|
Um. I just created a project and added a checkbox to the form and set Enabled to FALSE. Then I changed the Form's backcolor to white and the checkbox backcolor also changed to white? This doesn't happen on your computer? What version of Vis' Studio are you using?
Regards,
Jason Pezzimenti.
If you liked the answer that I have provided, then please click the 'Good Answer' link on the bottom-right of this post. Thank you.
|
|
|
|
|
Hi Jason,
Thanks for your reply. I'm using VS 2005. What version are you using?
When I set
oCheckBox.Enabled = false; and then
oCheckBox.BackColor = Color.White; it makes the surrounding area behind the checkbox whiteish.
|
|
|
|
|
Sorry for the late response MWRivera, I fell asleep.
I'm using VS 2008 Express Edition.
MWRivera wrote: When I set
oCheckBox.Enabled = false;
and then
oCheckBox.BackColor = Color.White;
it makes the surrounding area behind the checkbox whiteish.
...Are you saying that you have solved your problem? I'm a little confused. In your original post you stated that you want it to be white. I hope you have solved it. I do have a question though, is your checkbox ontop of another control, picturebox? Or is it just on the form background?
Regards,
Jason Pezzimenti.
|
|
|
|
|
Hi Jason,
No I heven't solved the problem I was just running through the details of what I have and the output I get, which isn't the desired output.
I guess VS 2008 solved this issue seems though you are getting different results.
No the checkbox isn't on top of any other coltrol or picturebox, it's just put onto a form.
Thanks,
Mel
|
|
|
|
|
Hi there,
I just want to let you know that I did find a work around. Not the best but it's alot more what I was looking for. It uses the OnClick event and when the form isn't in edit mode the checkBox is put back to it's origional state. I've included an example below to make it clearer:
oCheckBox.Click += new System.EventHandler(oCheckBox_OnClick);
private void oCheckBox_OnClick (object sender, System.EventArgs e)
{
if (!EditMode)
{
if (oCheckBox.Checked)
oCheckBox.Checked = false;
else
oCheckBox.Checked = true;
}
}
If you have any feedback it would be very welcome.
Thanks again,
Mel
|
|
|
|
|
The other day I was stooging around on the web and I found WindowsClient.NET[^], take a look at the first item.
I don't know if it will solve your problem because I have not looked at it myself yet, but it must be worth a look?
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.”
|
|
|
|
|
thanks, I'll take a look at that and give you feedback on how it goes.
|
|
|
|
|
Hi,
I have created a windows application in C# that kills a process on a specified time and starts the same process at another time. The process kill is successful but icon in system tray still remains. Each time a new process is created, icons are added ..so one application has 3-4 icons with only one icon thats the real application and the rest disappear only whn u hover mouse over them.
I believe that the system tray needs to be refreshed somehow. Can anyone provide help on how to get rid of the icons.
Thanks
|
|
|
|
|
http://www.codeproject.com/KB/system/TrayIconBuster.aspx
|
|
|
|
|
Thanx xmen..
Your reply is an answer but it seems that the application goes thru all processes... Is it possible to change ths code to "remove the icon for this process"... or do i have to read in all processes and then remove ones which have no filename...
Actually, i realize that its a bit too early to reply coz i hvent looked into code that much...
Thankyou for forwarding such a helpful application...
Best regards
|
|
|
|
|
When your application exits, inside the Form_Closing event handler you should use this code:
notifyIcon1.Dispose();
That will ensure your 'system tray' icon gets removed when your application exits.
Regards,
Jason Pezzimenti.
If you liked the answer that I have provided, then please click the 'Good Answer' link on the bottom-right of this post. Thank you.
|
|
|
|
|
he is killing other applications...
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Thanks for that. I only just realized, my brain no work properly this morning lol
Regards,
Jason Pezzimenti.
If you liked the answer that I have provided, then please click the 'Good Answer' link on the bottom-right of this post. Thank you.
|
|
|
|
|
My application is a windows service. it doesn't have any icon. I am closing another application which has an icon. This application doesn't provide any interface to restart it so i find its processes in task manager, save it exe path from there and then kill the processes. The path is used to start the service again if needed.
When i kill the process, its icon remains and disappears only when i move mouse over it.
|
|
|
|
|
Sorry for my misunderstanding in my previous post. It sounds like that article Xmen gave you would be the way to go. I hope it works out well.
Regards,
Jason Pezzimenti.
If you liked the answer that I have provided, then please click the 'Good Answer' link on the bottom-right of this post. Thank you.
|
|
|
|
|
|
Of course it works, how dare you doubt that?
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
That's a great article by the way
Regards,
Jason Pezzimenti.
|
|
|
|
|
Thanks. I wanted the problem solved at that time, and no solution seemed to be available, so...
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|