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 Can I show my Image to to my form 1

Status
Not open for further replies.

MY3MCS

Technical User
Apr 17, 2003
49
GB
Good Day to all of you. Can anybody please help me with my problem? I have a pageframe on my form and on page 1, I put there an Image box. Inluded in my dbf is a field "picture" (gen). How can I show It on my form?
Thanks in advance ang more power.

 
I don't believe the image control can't be directly bound to a General field - you'd need to extract the picture and change the Image's Picture property to use that file.

Rick
 
Rick,

I don't believe the image control can't be directly bound to a General field

I believe it can. I'm pretty sure I've done this -- but not 100% certain.

MY3MCS,

Set the ControlSource property of the Image control to the name of the general field.

Let us know if it works.

Mike




Mike Lewis
Edinburgh, Scotland
 
Hey Mike,

If there's no controlsource in the property of my Image Control, what would I do? I can't find it. I hope I am doing the right thing.

Thanks...
 
MY3MCS,

I am indeed privileged to be able to assist you with your problem. I have always desired to post a solution one day, but the questions that have been coming up are so difficult for me. But alas I have got the answer for one!

Instead of an imagecontrol, you would need to use an oleboundcontrol. The latter has a controlsource which you set to the General field containing the photo. If the picture is in a field called photo of a table called photoalbum, then you set the olebound control to a controlsource of [photoalbum.photo], braces excluded.

Good Luck
 
Hey Mike,

I GOT IT!!! THANK YOU VERY VERY MUCH. YOU'RE A GENIUS. AND TO YOU RICK. THANKS ALSO FOR YOUR TIME AND HELP. HOPE TO HEAR FROM YOU GUYS SOON.


 
MY3MCS,

Did you find a way to make the image control work like Mike suggested (if so how?), or did you use the solution that castor2003 proposed in using an oleboundcontrol?

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Yeh MY3MCS,

How did you use the imagecontrol to bind it to your General picture field. The imagecontrol has no controlsource property as Mike questioned.

 
MY3MCS

How can I show It on my form?

faq184-2394.






Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
castor2003,

Star for you.

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
I was wrong and Caster was right. There is no ControlSource for an Image.

What I did was to drag a General field from the data environment onto a form. I looked at the property sheet and saw that it had put the alias.fieldname into the ControlSource property.

Of course, I should have checked that it was an Image control. In fact it was an OLE bound control, as Castor correctly said.

Mike


Mike Lewis
Edinburgh, Scotland
 
Mike,
I know what you mean. Sometimes the "obvious" answer just isn't the right one, but I've almost always found that there is a some way to do it in VFP!

Rick
 
Hey Guys!
Thanks for showing interest to my problem(ex) but Here's what I did.
I save all the Pictures into my file under general field and when I made my form, I put the oleboundcontrol instead of the imagecontrol. Then on the sourcecontrol of it, I put my database file and it worked. Yes, I followed Mike's suggestion. I hope I answered all your questions guys. Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top