Windows窗体应用程序中的跟踪栏代码 [英] code for trackbar in windows form application

查看:73
本文介绍了Windows窗体应用程序中的跟踪栏代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我的Windows窗体应用程序中有一个跟踪栏,还有一个文本框.我应该只在释放鼠标时才能显示跟踪栏的值.我该怎么做?

问候.


there is a trackbar in my windows form application and there is a text box.I should be able to display the value of the trackbar only upon the release of mouse.How do i do it so?

Regards.

推荐答案

只需使用TrackBar的MouseUp事件,如下所示:-

Just use the TrackBar''s MouseUp event, like this:-

private void trackBar1_MouseUp(object sender, MouseEventArgs e)
        {
            textBox1.Text = trackBar1.Value.ToString();
        }




希望对您有帮助




Hope this helps


这篇关于Windows窗体应用程序中的跟踪栏代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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