我想使用轨迹栏来改变窗体的不透明度.
这是我的代码:
decimal trans = trackBar1.Value / 5000;
this.Opacity = trans;
Run Code Online (Sandbox Code Playgroud)
当我构建应用程序时,它会出现以下错误:
无法隐式转换
decimal为double.
我尝试使用trans,double但然后控件不起作用.这段代码在过去的VB.NET项目中运行良好.
如何检测editText的删除(退格)键事件?我尝试过使用TextWatcher,但是当editText为空时,当我按下删除键时,没有任何反应.即使没有文本,我想检测删除键按下一个editText.