Home > Archive > FoxPro Help and Support > June 2005 > Re: Pictures on a Form!









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Pictures on a Form!
Ioannis Stefis

2005-06-05, 8:24 pm

I did it with the first way!!!
do mymethod()
thisform.Image1. Picture='c:\test'+a
lltrim(str(thisform.kaopid1.value))+'.jp
g'

Thanks a lot Stefan.


"Ioannis Stefis" <stefsin@otenet.gr> wrote in message
news:uXY7bSKaFHA.1456@TK2MSFTNGP15.phx.gbl...
> VFP9
> I store the path and names of mypictures (jpg type) in a character field

of
> a table (f.e. with 10 records).
> I make for the table a simple form with a buttonset using the wizard.
> I put an Image control on the form.
> How can I see the corresponding pictures during the navigation of the

form?
>
> Thanks in advance
>
>
>



Stefan Wuebbe

2005-06-06, 3:24 am


"Ioannis Stefis" <stefsin@otenet.gr> schrieb im Newsbeitrag
news:e4XrujgaFHA.3572@TK2MSFTNGP12.phx.gbl...
>I did it with the first way!!!
> do mymethod()
> thisform.Image1. Picture='c:\test'+a
lltrim(str(thisform.kaopid1.value))+'.jp
> g'
>
> Thanks a lot Stefan.


You're welcome.
FWIW, I pasted an example below (few weeks old :)


-Stefan



--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------


* image_picture_pictur
eval.prg
LOCAL oForm as Form
oForm = CREATEOBJECT('TestFo
rm')
oForm.Show(1)
RETURN

DEFINE CLASS TestForm as Form
AutoCenter = .T.
PROCEDURE Load
LOCAL cFile
CREATE CURSOR temp (picfile C(250), picbinary BLOB)
cFile = HOME(4)+'\BITMAPS\Ga
uge\VERT.BMP'
INSERT INTO temp VALUES (cFile, FILETOSTR(cFile))
cFile = HOME(4)+'\BITMAPS\Ga
uge\THERLFT.BMP'
INSERT INTO temp VALUES (cFile, FILETOSTR(cFile))
cFile = HOME(4)+'\BITMAPS\Ga
uge\HORZ.BMP'
INSERT INTO temp VALUES (cFile, FILETOSTR(cFile))
GO TOP IN temp
ENDPROC

ADD OBJECT Image1 as Image WITH ;
Left = 50
ADD OBJECT Image2 as Image WITH ;
Left = 150

ADD OBJECT cmdBack as Commandbutton WITH ;
Height = 24, Top = 190, Left = 50, ;
Caption = '<'
PROCEDURE cmdBack.Click
SKIP -1 IN temp
IF BOF('temp')
?? CHR(7)
GO TOP in temp
ENDIF
Thisform.Refresh()
ENDPROC

ADD OBJECT cmdNext as Commandbutton WITH ;
Height = 24, Top = 190, Left = 150, ;
Caption = '>'
PROCEDURE cmdNext.Click
SKIP 1 IN temp
IF EOF('temp')
?? CHR(7)
GO BOTTOM in temp
ENDIF
Thisform.Refresh()
ENDPROC

PROCEDURE Refresh()
WITH Thisform
.image1.Picture = temp.picfile
.image2.PictureVal = temp.picBinary
ENDWITH
ENDPROC


ENDDEFINE
* eop

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com