x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

WinCE - C# Problem

Udayan Page Icon Posted 2005-07-28 2:30 PM
#
Avatar image of Udayan
H/PC Newbie

Posts:
1
Status:
Hi Guys,

I am developing a system using WinCE on Intel PXA255 processor.

On a particular screen, I want to change a button color when I click the button.

So the code is -

private void btnOpt1_Click(object sender, System.EventArgs e)
{
this.btnOpt1.Backcolor = Color.Red ;

// Other code follows here
}


When I run this code in Windows XP, it runs perfectly well. The button turns RED. However when I port the exact same code on WinCE, it doesn't work! Nothing crashes but the button doesn't change its color.


Interestingly this is happening only with the buttons. In the beginning I thought WinCE doesn't allow to change the environment color at the run time so I tried changing the color of a form when a particular event is generated and it works!

Any thoughts?

Thanks for the help.
 Top of the page
Snappy! Page Icon Posted 2005-07-28 5:27 PM
#
Avatar image of Snappy!
H/PC Elder

Posts:
1,712
Location:
New Mexico, US
Status:
Maybe you send an invalidate to the Cbutton and see if it can force a redraw or something? hmmm

Or you can override the OnBackGround Erase for Controls, filter for CButton (assuming you are using CButton class) and do a CFill or something ... ?
 Top of the page
Jump to forum:
Seconds to generate: 0.125 - Cached queries : 59 - Executed queries : 9