Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21264

[RESOLVED] how i set Picture In the code area

$
0
0
i try this one :
Code:

Private Sub Form_Load()
Adodc1.Refresh
Dim num As Integer
num = Adodc1.Recordset.RecordCount
Dim Picture2() As PictureBox ' create it
ReDim Picture2(num) As PictureBox ' amount

 Picture2(0).Picture = LoadPicture(Adodc1.Recordset.Fields("URL").Value)
End Sub


error:
Run time error '91':
Object vaiable or with block variable not set

it show me:
Picture2(0) = nothing

what i can do to Set it


edit:
i found how
but may someone Tell me what it does??
why that Set the picturebox????

only i needed to put
Code:

Set Picture2(i) = Me.Controls.Add("VB.PictureBox", "wasup" & i) ' setting the picture

before
Code:

Picture2(0).Picture = LoadPicture(Adodc1.Recordset.Fields("URL").Value)
What the Function "Add" get??? i mean what the parameters that the Function "Add" get

Viewing all articles
Browse latest Browse all 21264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>