csharp System.Windows.Forms.Control.Visible类(方法)实例源码

下面列出了csharp System.Windows.Forms.Control.Visible 类(方法)源码代码实例,从而了解它的用法。

作者:.NET开发    项目:System.Windows.Form   
public void DisplayScrollBars()
 {
    // Display or hide the scroll bars based upon  
    // whether the image is larger than the PictureBox.
    if (pictureBox1.Width > pictureBox1.Image.Width)
    {
       hScrollBar1.Visible = false;
    }
    else
    {
       hScrollBar1.Visible = true;
    }
    
    if (pictureBox1.Height > pictureBox1.Image.Height)
    {
       vScrollBar1.Visible = false;
    }
    else
    {
       vScrollBar1.Visible = true;
    }
 }


问题


面经


文章

微信
公众号

扫码关注公众号