esierp
January 19th, 2000, 11:04 PM
I have an image control on my form. I am trying to load a picture into it at run-time. I am using the following piece of code for this:
Set MyImageControl.Picture = LoadPicture("D:\MyPic.jpg")
When I run the program, I get the following error:
Compile Error: Wrong number of arguments or invalid property assignment
And when I return to the code window, LoadPicture is highlighted.
From everything that I have seen about the Image control, this should work. If I set the picture at design time, it works fine. Am I possible forgetting to include some Reference that I need? I have also tried using a PictureBox control and receive the same error. If anyone has any ideas, I would appreciate it.
Thanks in advance
Set MyImageControl.Picture = LoadPicture("D:\MyPic.jpg")
When I run the program, I get the following error:
Compile Error: Wrong number of arguments or invalid property assignment
And when I return to the code window, LoadPicture is highlighted.
From everything that I have seen about the Image control, this should work. If I set the picture at design time, it works fine. Am I possible forgetting to include some Reference that I need? I have also tried using a PictureBox control and receive the same error. If anyone has any ideas, I would appreciate it.
Thanks in advance