|
-
January 20th, 2000, 12:04 AM
#1
Image Control
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
-
January 20th, 2000, 12:40 AM
#2
Re: Image Control
Hi, maybe you can try omitting the Set statement; just type:
MyImageControl.Picture = LoadPicture("D:\MyPic.jpg")
I am not 100% certain in your case, but I have been using LoadPicture with existing image controls in a form and it works.
I hope this helps. :-)
-
January 20th, 2000, 12:43 AM
#3
Re: Image Control
Thanks for the reply, but I receive the same error even after omitting Set.
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
|