I am trying to use the Toolbar and the Imagelist ActiveX controls in a form. I have read everyone's advice concerning the programming involved for VFP.
My form works well when it is executed within VFP. However, the form does not work when I compile it into an .APP or an .EXE. When I execute it, I get an OLE error (#1426 - OLE error code 0x800a01e1: Unknown COM status code). The error occurs at the .Add method of ListImages.
The following code is in the form's INIT method...
WITH THISFORM
.Imagelist.ListImages.Add(,"New", loadpicture("new.bmp"))
.Imagelist.ListImages.Add(,"Open", loadpicture("open.bmp"))
ENDWITH
This.Coolbar.Imagelist = This.Imagelist
WITH THISFORM.Coolbar
.Buttons.Add(,"New","New",1,"New")
.Buttons.Add(,"space",,3,)
.Buttons.Add(,"Open","Open",1,"Open")
ENDWITH
The main program file code that starts the app is...
DO FORM coolform
READ EVENTS
Is this a bug (or new one)? Your help is greatly appreciated.
Leo St-Jacques
(and happy Canada Day and Independence Day to all fellow VFP Canadians and Americans)
Leo St-Jacques
Solis Productions