Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LoadPicture() in VFP 6.0

351 views
Skip to first unread message

Ming Tam

unread,
Jul 27, 1999, 3:00:00 AM7/27/99
to
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


Paul Hemans

unread,
Jul 28, 1999, 3:00:00 AM7/28/99
to
That's a problem that I found as well. I had to load the control manually

matlab

unread,
Jul 28, 1999, 3:00:00 AM7/28/99
to

Paul Hemans wrote:

> 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


Patrick & Anne Blackman

unread,
Jul 28, 1999, 3:00:00 AM7/28/99
to
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. I have found that the Loadpicture does not work properly so I
have avoided it completely, just use the image control and link at runtime
that works fine.

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

matlab

unread,
Jul 28, 1999, 3:00:00 AM7/28/99
to
Patrick & Anne Blackman wrote:

> 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


troy

unread,
Jul 29, 1999, 3:00:00 AM7/29/99
to
i use a subclass of the listview / treeview control and execute the
following code in the init of the control. it works fine in a
stand-alone .EXE


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
>


Paul Hemans

unread,
Sep 13, 1999, 3:00:00 AM9/13/99
to
right click and then take the controls properties

hugh

unread,
Apr 21, 2015, 5:47:17 AM4/21/15
to
I get a OLE error code 0x80004005 unspecified error.
i guess the problem is with LOADPICTURE().kindly tell me the code how to load picture in to list view with out using LOADPICTURE as you suggested we can do that by manually.
0 new messages