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?
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?