Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Display JPG Image in a Form w/VPF 8

Status
Not open for further replies.

MSW

IS-IT--Management
Jan 9, 2002
48
US
Hello; I'm very new to Visual Fox Pro and need some help displaying JPG pictures in my search form..

I have a table that contains the following fields:
1)Itemnum
2)Filepath -(which contains the drive\path\filename.jpg of the image).

All I want this program to do is allow a user to type in an itemnumber and then display the corresponding JPG file assuming that the search is found..

I've read on other links that all you need is to create a .image control but I can't seem to figure out how to create that either??

Thanks for your help...
 
After you have opened your form, from the main menu in VFP, select 'View' then 'Form Controls Toolbar'.
Click on the 'Image' control, then click on your form to place it. Size it however you wnat, or select autosize. Then in the 'Picture' property of the Properties dialog, (Right click on the image control and select 'Properties'), put the name of the .jpg file you want displayed.


-Dave S.-
[cheers]
Even more Fox stuff at:
 
Okay I'm able to follow this and now can display the first JPG file in the table but how do I get the picture to change as I move thru the table..

Thanks for your help...
 
Actually, that was to get you on the right track for showing a picture in an image control. To get the picture to change, you need to place code like the following example in your forms' Refresh event:

ThisForm.Image1.Picture = MyTable.Filepath


-Dave S.-
[cheers]
Even more Fox stuff at:
 
That works great I now can move thru the table and the image changes as well.. I have one more question that I can't seem to figure out.. When I ran the Forms Wizard it created a set of buttons at the bottom of the page and one is the FIND button.. Is there anyway for me to change this to a seek() because I don't really want the user to have to go thru the steps of picking the field etc when you hit that button.. Actually I would like to place a field on the form that when there's something typed in it a seek()is invoked..

Thanks again for your help...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top