I've encountered a lot of problems on winME and the error 2290. Sometimes the same problem occured on win2000 with "heavy users" of the application. It was always the same : after a short while the application crashed with error 2290. After restarting the application: same story.
After extensive searching, I discovered that the error occured when the GDI resources reached 0 % (winME). This was due to a memory leak in my application !
Wrong code (example):
NO-RETURN-VALUE chCtrlDocImg:ImageList:ListImages:ADD(iIconTeller,szDoc,LOAD-PICTURE(szIconPath)).
It seems that the LOAD-PICTURE used like this generates a memory leak.
Right code:
DEFINE VAR chIcon AS COM-HANDLE NO-UNDO.
ASSIGN chIcon = LOAD-PICTURE(szIconPath).
NO-RETURN-VALUE chCtrlDocImg:ImageList:ListImages:ADD(iIconTeller,szDoc,chIcon).
RELEASE OBJECT chIcon