【问题标题】:How to put two pictureboxes into an array of pictureboxes如何将两个图片框放入图片框数组中
【发布时间】:2013-01-17 03:42:20
【问题描述】:

我正在用visual basic编写一个程序(在windows窗体应用程序模式下),我在这个程序中有两个图片框,我希望它们是一个数组,比如p[0]p[1],是否可以在视觉中基本的?

【问题讨论】:

    标签: vb.net visual-studio-2010 picturebox


    【解决方案1】:

    您可以制作任何您想要的数组,包括一组图片框... 好久没用过VB.Net了,不过如果我没记错语法的话:

    Imports System.Windows.Forms
    
    ....
    
    Dim arr As System.Windows.Forms.PictureBox() = New PictureBox(2) {}
    arr(0) = New PictureBox()
    arr(1) = New PictureBox()
    

    【讨论】:

    • 我已将工具箱中的图片框添加到 Windows 窗体应用程序中,是否有任何解决方案使它们成为数组?比如改名字什么的?
    • @Navid777,您没有声明您希望从工具箱中完成此操作...无论如何 - 不幸的是,如果您使用设计器,您将无法“分组”一组控件成一个数组...
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 2010-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-21
    • 2017-05-03
    相关资源
    最近更新 更多