>I have made a form for the user to key in personal records. For that I need the form to display their photo with their particulars beside.
>
>I read through about using OLE for the purpose, but I didn't find any any info of using OLE withouht using the OLE server. Here is my task in planning.
>
>To keep photo, there will be a subdirectory to store all the photos in bmp file (such as passport size photo). In my mind, I want to make a control called "Properties" for the user to browse to add the photo on the form. However, the form should have an "auto-photo-finder" , where it searchs for the ID_number.bmp and automatically add the photo to the form, instead of the user need to browse everytime for it.
>
>So, can anyone give me some idea? What should I use? Making my own .... errr...class?
>
>
>Gan
That's easy. Here is some code fragment from a Refresh() of an existing app of mine:
LOCAL llLocked
llLocked = thisform.lockScreen
thisform.lockScreen = .T.
IF FILE(SUBSTR(goApp.cDefaultDatabase, 1, RAT("\", goApp.cDefaultDatabase)) + ;
"\PICTURES\" + ;
v_Pratiquant.cLicenceId + ;
".BMP")
this.cPageFrame1.Page1.cImage.Picture = ;
SUBSTR(goApp.cDefaultDatabase, 1, RAT("\", goApp.cDefaultDatabase)) + ;
"\PICTURES\" + ;
v_Pratiquant.cLicenceId + ;
".BMP"
this.cPageFrame1.Page1.cImage.Visible = .T.
ELSE
this.cPageFrame1.Page1.cImage.Picture = ""
this.cPageFrame1.Page1.cImage.Visible = .F.
ENDIF
thisform.lockscreen = llLocked
José