*INIT Method: IF !PEMSTATUS(_screen,'AssociatedIconInstanceCount',5) _screen.AddProperty('AssociatedIconInstanceCount',0) ENDIF _screen.AssociatedIconInstanceCount = _screen.AssociatedIconInstanceCount + 1 IF _screen.AssociatedIconInstanceCount = 1 DECLARE SHORT DrawIcon IN Win32API INTEGER Hdc, INTEGER X, INTEGER Y, INTEGER hIcon DECLARE INTEGER ExtractIcon IN Shell32 INTEGER hInst, STRING @lpszExeFileName, INTEGER nIconIndex DECLARE INTEGER GetClassLong IN Win32API INTEGER hWnd, INTEGER nIndex DECLARE INTEGER GetDC IN Win32API INTEGER hWnd DECLARE INTEGER ReleaseDC IN Win32API INTEGER hwnd, INTEGER hdc DECLARE INTEGER ExtractAssociatedIcon IN Shell32 INTEGER hInst, STRING @lpIconPath, INTEGER @lpiIcon ENDIF this.Visible=.f. && Since the actual picture property is not drawn, make it invisible. this.hInstance = GetClassLong(thisform.HWnd, -16) this.hdc = GetDC(thisform.HWnd ) FilePath_Assign Method: LPARAMETERS vNewVal *To do: Modify this routine for the Assign method IF VARTYPE(vNewVal)=[C] AND FILE(vNewVal) THIS.filepath = m.vNewVal LOCAL lnIndex lnIndex=0 *HIcon = ExtractIcon(HInstance, lcfilename, 0) this.hicon = ExtractAssociatedIcon(this.hInstance,@vNewVal,@lnIndex) =DrawIcon(this.Hdc, OBJTOCLIENT(this,2), OBJTOCLIENT(this,1), this.HIcon) this.ZOrder(0) ENDIF