I have a form which is basically composed of Microsoft Listview
control 6.0 and ImageList control 6.0. I try to use LoadPicture function
to add pictures into the ImageList control, everything goes fine when I
run it in the VFP. However, after building the program into executable
file and then executing it, a error which is listed below occurs.
OLE error Code 0x800a01e1 : Unknown COM Status code
Originally, I suspect the error is caused by those ActiveX controls. So
I just make a blank form with following code in init event only.
Local Try
Try = LoadPicture("C:\try.bmp")
The Error Still Occur!!!!!!
So what's going on? Why the program is working properly in the VFP, but
error comes out after I building it into executable file? Any ideas?
Thank you for your kindly help. :>
Best wishes,
Ming
> That's a problem that I found as well. I had to load the control manually
Thank you for your reponse, but would you please tell me how to load the
control manually? If it is possible, would you please give me some examples?
Best wishes,
Ming
when you use the loaadpicture and you compile you must also store the bmp
files on the user's machine if not you will get an error as the loadpicture
is looking for the dirorty where the bmp files are.
You would not get that problem if you load the files from the property page
of the image control.
Ming Tam <my...@hknet.com> wrote in message
news:379DCCD9...@hknet.com...
> I always load my bmp etc directly into the Image control using its property
> pages and then link the image control to the listview at runtime and this
> works fine.
Finally, I have used the method that you have stated above to solve my problem.
Thank you for your kindly reponse.
Best wishes,
Ming
oImgLst2 = CREATEOBJECT("MSComctlLib.ImageListCtrl.2")
WITH oImgLst2
.ImageHeight = 32
.ImageWidth = 32
.MaskColor = RGB(192,192,192)
.ListImages.Add(,"Prop",LOADPICTURE("ICONS\bclass.Ico"))
.ListImages.Add(,"Text",LOADPICTURE("ICONS\bText.Ico"))
ENDWITH
WITH THIS.Object
.Icons = oImglst2
ENDWITH
On Tue, 27 Jul 1999 23:14:33 +0800, Ming Tam <my...@hknet.com> wrote:
>Dear all,
>
> I have a form which is basically composed of Microsoft Listview
>control 6.0 and ImageList control 6.0. I try to use LoadPicture function
>to add pictures into the ImageList control, everything goes fine when I
>run it in the VFP. However, after building the program into executable
>file and then executing it, a error which is listed below occurs.
>
> OLE error Code 0x800a01e1 : Unknown COM Status code
>
>Originally, I suspect the error is caused by those ActiveX controls. So
>I just make a blank form with following code in init event only.
>
> Local Try
>
> Try = LoadPicture("C:\try.bmp")
>
>The Error Still Occur!!!!!!
>
>So what's going on? Why the program is working properly in the VFP, but
>error comes out after I building it into executable file? Any ideas?
>
>Thank you for your kindly help. :>
>
>Best wishes,
> Ming
>