我希望在button
应用中按下时更改windows form
的颜色,我想使用颜色代码。有没有办法让button
颜色#C0C0C0 ??
答案 0 :(得分:1)
您可以使用rgb equivalent.Color空格#c0c0c0
RGB = 192 192 192
button1.ForeColor= Color.FromArgb(192, 192, 192);
答案 1 :(得分:0)
This may help you..
<script>
function changeCol(btnid){
document.getElementById(btnid).style.backgroundColor = "#ff00F0";
}
</script>
<input type = "button" id = "btn" value="$alt1" onClick="changeCol('btn')">