picture from path using button
how can i do this....
i have the file name finally, store in a textbox. i want to be able to click a button and show the picture that is listed in the textbox in picture1 ( a picture box )
Thanks
[214 byte] By [
vchatlive] at [2007-11-11 10:09:21]

# 1 Re: picture from path using button
put this code in the Button Click event:
set pct.Picture = loadPicture(txt.Text)
where pct and txt are the names of the PictureBox and of the TextBox
mstraf at 2007-11-11 17:23:07 >

# 2 Re: picture from path using button
any way to make it a certain size? loadpicture(mypic, <something here>)
# 3 Re: picture from path using button
instead of using a PictureBox, use an Image control and set its Stretch property to True, so that the picture fits the size of the control
mstraf at 2007-11-11 17:25:16 >

# 5 Re: picture from path using button
got it, its done the same way picture boxes are, thanks everyone
# 7 Re: picture from path using button
got that one working as long as its in C:\foldernamewithnospaces if for some reason its got spaces in it like C:\Documents and Settings\User\Desktop\images.jpg then it doesnt work, anyway to make FTP uplaod work with spaces? Thanks
# 8 Re: picture from path using button
Inet1.Execute , "put" & " " & Label7.Caption & " " & "/" & frmlogin.Text1.Text & "/myphoto.jpg"
is the code im using
# 9 Re: picture from path using button
would it be possible to scan the pathname for spaces and change "My Path Name" to My%20Path%20Name or something like that?
# 10 Re: picture from path using button
FIXED!!!!!!
Inet1.Execute , "put" & " " & Chr(34) & Label7.Caption & Chr(34) & " " & "/" & frmLogin.Text1.Text & "/myphoto.jpg"
For anyone that needs the code