如何使焦点成为与F5相同的窗口按钮>按键 [英] how to make focus a window button same like F5 > button

查看:57
本文介绍了如何使焦点成为与F5相同的窗口按钮>按键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你怎么能让按钮看起来像一个debugg(F5)按钮。当鼠标或按钮聚焦时,背面外观应该是黄色。而失去焦点时它应该像之前一样

Hi how can i make a button apparence like a debugg(F5) button .When mouse or button got focussed the back side apparance should be yellow.and while lose focus it should same like before

推荐答案

你需要使用焦点事件这个



事件 - >焦点部分



输入

离开



这两个事件需要使用





谢谢,
You need to use Focus Events for this

Events -> Focus Section

Enter
Leave

These two events are need to use


Thanks,


你需要使用事件Enter And Leave for the button :

开启输入更改为黄色,然后返回保留返回原样



you need to use the events Enter And Leave for the button :
On Enter change to yellow and on Leave return as it was

private void button1_Enter(object sender, EventArgs e)
     {
         button1.BackColor = Color.Yellow;
     }

     private void button1_Leave(object sender, EventArgs e)
     {
         button1.BackColor = SystemColors.Control;
     }





希望它有所帮助。



Hope it will help.


这篇关于如何使焦点成为与F5相同的窗口按钮>按键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆