日期:2014-05-18  浏览次数:20770 次

Winform 状态栏一个控件的实现问题
下图是win7 MSPAINT的状态栏,我想问下最右边的缩放控件是怎么实现的啊,有现成的控件用吗?


------解决方案--------------------
C# code
            Button btn1 = new Button();
            ToolStripControlHost t1 = new ToolStripControlHost(btn1);
            t1.Width = 40;
            t1.AutoSize = false;
            statusStrip1.Items.Add(t1);//左按钮
            TrackBar bar = new TrackBar();
            ToolStripControlHost t2 = new ToolStripControlHost(bar);
            t2.Width = 140;
            t2.AutoSize = false;  
            statusStrip1.Items.Add(t2);//tracebar
            Button btn2 = new Button();
            ToolStripControlHost t3 = new ToolStripControlHost(btn2);
            t3.Width = 40;
            t3.AutoSize = false;
            statusStrip1.Items.Add(t3);//右按钮