# Re: 怎样才能动态增加picture box / image box?

Posted by 小琳 on September 12, 1999 at 20:33:29:

In Reply to: 怎样才能动态增加picture box / image box? posted by tong110 on September 12, 1999 at 17:58:15:

: 怎样才能动态增加picture box / image box?

:::假如使用PictureBox的话，程式则如下：
Private Sub Command1_Click()
Dim temp As PictureBox
Set temp = Controls.Add("VB.PictureBox", "tempnew")
With temp
.Left = 0
.Top = 0
.Picture = LoadPicture("F:\Girl Friend\sh4.jpg")
.AutoSize = True
.Visible = True
End With
End Sub

Follow Ups:

- Re: 怎样才能动态增加picture box / image box? tong110 13:16:05 9/16/99 (0)