If you have used an older version of FoxPro and switch to Visual FoxPro, you will find several differences such as the terminology, language, tables and databases, keystrokes, tools, screens, and reports and layouts. If m.nState = 0 And oDataObject.Visual FoxPro refers to versions of FoxPro that are newer than version 2.6 this includes versions 3.0 – 9.0. Lparameters oDataObject, nEffect, nButton, nShift, nXCoord, nYCoord, nState It is rude to leave all cleanup to moderators. Sounds like we are writing pieces of your homework? Also I would appreciate if you read the sticky message at top and take the action as appropriate. PS: Why I feel like you are going too fast and not reading help files nor checking the solution samples first.
#FOXPRO 2.6 OICTURE CODE#
Here is a sample code to do that (warning no check if the dropped file is a valid picture file - if you drop multiple files first one in array is used). Here I think you meant to drag&drop from files system (windows explorer). However, most of the time it is not between fox objects and you need to use OleDrag* series. If you would drag&drop between native fox objects you could use drag* properties and methods. If (This.RowColChange % 2 = 1) & row changed - pointer moved * Hence this code does what navigation buttons' code (laPictures, Filetostr(Addbs(m.lcSamplePicturePath)+laPictures)) LcSamplePicturePath = _samples+'data\graphics'Ĭreate Cursor myPictures (fileName c(20), photo w)įor ix = 1 To Adir( laPictures, Addbs(m.lcSamplePicturePath)+'*.gif' ) You can do this: = holders.photo Here is a sample form - note that you don't need any delay nor do you need extraction to disk: Public loFormĬolumnCount=1, RecordSource='myPictures', Height=600,Width=300Īdd Object myPicture As Image With Left=320,Top=50 You don't need to extract back to disk if you are using a BLOB (and that means you are using a version that has Image.PictureVal property). However I find it acceptable sometimes to keep them in a BLOB/Memo field. This way it is easier for backups and it lessens the chance the user will identify a photo in a path that is later deleted." Yes:) I would say that when database is VFP. But if at all possible I would like to keep the photos in the DB. " I know some will say that I should put the path to the file into the table instead.
Any and all input is greatly appreciated. This way it is easier for backups and it lessens the chance the user will identify a photo in a path that is later deleted. I know some will say that I should put the path to the file into the table instead.
Is there a way to allow the user to drag and drop a picture onto the form? I am sure there is a better way to do all of this, can someone direct me 2. It appears the cache just picks up the last TMP.BMP and displays it.
Picture = ("TMP.BMP") I had to put the INKEY(2) to get this to work. TmpPicture DELETE FILE ("TMP.BMP") TmpPicture= STRTOFILE ( holders.photo, "TMP.BMP", 0) INKEY (2) & Had to put this to delay the processing thisform. I then issue the following code when the edit screen is called. So I have loaded the pictures into a BLOB with the following syntax: x= FILETOSTR ("example.bmp") replace holders.photo WITH x Based on what I have read it is best to use a BLOB. For example a photo of the customer, in the customer record. I am trying to put a picture/photo on a form. I have run into another issue and hope I can get additional help. Again, thank you to everyone for the great help.