|
-
January 5th, 2000, 11:20 PM
#1
How can i paint a image box?
I need to create a transparent image while in run time, unfountunately picture box doesn't support transparent images, i need image boxes to get the job done, but i don't know how to create a image box while in run time, please help.
-
January 6th, 2000, 03:23 PM
#2
Re: How can i paint a image box?
If you have VB6, you can use the Add Method of the Forms Controls Collection, ie.
private Sub Command1_Click()
me.Controls.Add "VB.Image", "Image1"
me!image1.Move 0, 0
me!image1.Picture = LoadPicture("C:\Files\mypic.gif")
me!image1.Visible = true
End Sub
Otherwise you can create a single Image control at Design time and set its Index Property to Zero, creating a Control Array, then:
private Sub Command1_Click()
Load Image1(Image1.Count)
Image1(Image1.Count - 1).Move 0, 0
Image1(Image1.Count - 1).Picture = LoadPicture("C:\Files\mypic.gif")
Image1(Image1.Count - 1).Visible = true
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|