Dynamicall创建多个图像Cotrol [英] Dynamicall Creating Multiple Image Cotrol

查看:78
本文介绍了Dynamicall创建多个图像Cotrol的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hey Freinds请给我以下代码。

我想创建动态(运行时)多个图像控制到面板中,图像按顺序放置。在单行中只显示4个图像然后在新行中它将显示另一个图像

Hey Freinds Please Give me code for following.
I want to create Dynamically(Run time) multiple image Control into the panel and Images are placed in sequence. In a Single Row only 4 images are display after then in a new row it will display another images

推荐答案

使用循环多次使用代码以动态生成图像控件



use below code multiple times using loop to dynamically generate image controls

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim image1 As PictureBox = Nothing
        image1.Height = 50
        image1.Width = 50
        image1.Load(imagepath)
        Panel1.Controls.Add(image1)


    End Sub







希望它能帮到你:)

plz投票并接受ans如果它有帮助你



享受编码




Hope it helps u :)
plz vote and accept ans if it helps u

Enjoy coding


这篇关于Dynamicall创建多个图像Cotrol的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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