Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting Photo without using OLE server?
Message
 
To
09/04/1999 03:53:08
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Miscellaneous
Thread ID:
00206803
Message ID:
00207270
Views:
19
>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.

*-- refresh the image
*-- GoApp.cDefaultDatabase contains the name of the DBC, remove it

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é
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform