Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

load picture

Status
Not open for further replies.

stibbetts

Technical User
May 6, 2004
64
US
i have an image created at runtime and I have loaded a picture into it but it's not displaying, i know that the image works becaseu it is displayed on the page before. i am using this code for the process:

Dim newpic As control, imim As String, objcontrol As control, imag As IPictureDisp
Set newpic = dlgLayout.MultiPage1.Pages(1).Controls.Add("forms.Image.1", ("image" & pgcntr), True)
newpic.Width = 438
newpic.height = 276
newpic.Left = 6
newpic.Top = 18
imim = "image" & pgcntr
For Each objcontrol In dlgLayout.Controls
If LCase(objcontrol.Name) = imim Then
objcontrol.Picture = LoadPicture("c:\Program files\Autodesk\Inventor 5.3\Bin\page.bmp")

Debug.Print "found"
Exit For
Else
Debug.Print "not found"
End If
Next
dlgLayout.Repaint
End Sub

this is created on a new page (the new page is created at runtime as well) am I doing something wrong?
 
oops, silly me, i was referencing the wrong page. the picture was coming in but on the first page over the origional so i couldnt tell :-[
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top