Reply

Join Date: Jun 2007
Posts: 7
Reputation: yasirfarid is an unknown quantity at this point 
Solved Threads: 0
yasirfarid yasirfarid is offline Offline
Newbie Poster

picture box

 
0
  #1
Jun 28th, 2007
hello, i am using picture box, and coding on form load

P1.Picture = "D:\My Document\My Pictures\Display Picture\ICE.BMP"

why it gives "TYPE MISSMACH" Error.

plz reply soon.

Yasir
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 166
Reputation: AV Manoharan is an unknown quantity at this point 
Solved Threads: 9
AV Manoharan AV Manoharan is offline Offline
Junior Poster

Re: picture box

 
0
  #2
Jun 28th, 2007
Originally Posted by yasirfarid View Post
hello, i am using picture box, and coding on form load

P1.Picture = "D:\My Document\My Pictures\Display Picture\ICE.BMP"

why it gives "TYPE MISSMACH" Error.

plz reply soon.

Yasir
The correct syntax is

P1.Picture = LoadPicture("C:\MyPict.bmp")

thanks to veena
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: picture box

 
0
  #3
Jun 28th, 2007
Hi Manoharan..

Why Thank Me....???

-Vee
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 166
Reputation: AV Manoharan is an unknown quantity at this point 
Solved Threads: 9
AV Manoharan AV Manoharan is offline Offline
Junior Poster

Re: picture box

 
0
  #4
Jun 28th, 2007
Originally Posted by QVeen72 View Post
Hi Manoharan..

Why Thank Me....???

-Vee
Don't you remember your own answers in this forum?
But I do.

regards
AV Manoharan
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 5
Reputation: edu2004eu is an unknown quantity at this point 
Solved Threads: 0
edu2004eu edu2004eu is offline Offline
Newbie Poster

Re: picture box

 
0
  #5
Jul 17th, 2007
Originally Posted by AV Manoharan View Post
The correct syntax is

P1.Picture = LoadPicture("C:\MyPict.bmp")

thanks to veena
yeah but what about if i want to load an impage from the internet? and if the image isn't bmp? It says file/path access error... could someone help me?
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 300
Reputation: jireh is an unknown quantity at this point 
Solved Threads: 42
jireh's Avatar
jireh jireh is offline Offline
Posting Whiz

Re: picture box

 
0
  #6
Jul 17th, 2007
yeah but what about if i want to load an impage from the internet?
Sorry I don't know what is an impage...

and if the image isn't bmp? It says file/path access error... could someone help me?
Use a Common Dialog Box

CommonDialog1.Filter = "Picture Files (*.bmp;*.jpg;*.gif)|*.bmp;*.jpg;*.gif;|"
CommonDialog1.ShowOpen
Image1.Picture = LoadPicture(CommonDialog1.FileName)
Last edited by jireh; Jul 17th, 2007 at 8:32 pm.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 5
Reputation: edu2004eu is an unknown quantity at this point 
Solved Threads: 0
edu2004eu edu2004eu is offline Offline
Newbie Poster

Re: picture box

 
0
  #7
Jul 18th, 2007
i meant image... not impage... sorry for that typo

well if the image isn't stored in the local PC, but is in a web site... for example if i want this http://www.daniweb.com/forums/myimag...tons/reply.gif displayed in a picturebox, how do i do it...?
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: picture box

 
0
  #8
Jul 18th, 2007
Hi edu,

use a "WebBrowser" Control and Navigate it to the url. check this

WebBrowser1.Navigate2 "http://www.whateverwebsite.com/imagesfolder/myimage.jpg"

Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 5
Reputation: edu2004eu is an unknown quantity at this point 
Solved Threads: 0
edu2004eu edu2004eu is offline Offline
Newbie Poster

Re: picture box

 
0
  #9
Jul 18th, 2007
Thanks, it worked
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1
Reputation: syamkumard is an unknown quantity at this point 
Solved Threads: 0
syamkumard syamkumard is offline Offline
Newbie Poster

Re: picture box

 
0
  #10
Jul 19th, 2007
me.picture(app.path&"name with extention of the pictur")
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC