954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

picture box

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

yasirfarid
Newbie Poster
7 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
 
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

AV Manoharan
Junior Poster
166 posts since Jun 2007
Reputation Points: 10
Solved Threads: 9
 

Hi Manoharan..

Why Thank Me....???

-Vee

QVeen72
Posting Shark
950 posts since Nov 2006
Reputation Points: 84
Solved Threads: 143
 
Hi Manoharan.. Why Thank Me....??? -Vee


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

regards
AV Manoharan

AV Manoharan
Junior Poster
166 posts since Jun 2007
Reputation Points: 10
Solved Threads: 9
 
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?

edu2004eu
Newbie Poster
5 posts since Jul 2007
Reputation Points: 10
Solved Threads: 0
 
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)

jireh
Posting Whiz
316 posts since Jul 2007
Reputation Points: 11
Solved Threads: 49
 

i meant image... not impage... sorry for that typo :D

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/myimages/buttons/reply.gif displayed in a picturebox, how do i do it...?

edu2004eu
Newbie Poster
5 posts since Jul 2007
Reputation Points: 10
Solved Threads: 0
 

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

QVeen72
Posting Shark
950 posts since Nov 2006
Reputation Points: 84
Solved Threads: 143
 

Thanks, it worked ;)

edu2004eu
Newbie Poster
5 posts since Jul 2007
Reputation Points: 10
Solved Threads: 0
 

me.picture(app.path&"name with extention of the pictur")

syamkumard
Newbie Poster
1 post since Jul 2007
Reputation Points: 10
Solved Threads: 0
 

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

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

from: QVeen72

---------------------------------------------------

hi there.

i have the same problem regarding with image.
what if the image in the web has extension name of .php?
how will i get it?

by the way, i am using vb6.0, a web browser and an imagebox where i will put the web image(.php) later on.

thank you in advance :)

mizkhyz
Newbie Poster
8 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

mizkhyz,

This thread is nearly two years old! In the future please start your own thread and if need be reference previous thread by copying and pasting the link in your thread. Also, it would help if you pasted the link to the php page you need help with as there could be a couple of different ways to solve your problem.

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

mizkhyz,

This thread is nearly two years old! In the future please start your own thread and if need be reference previous thread by copying and pasting the link in your thread. Also, it would help if you pasted the link to the php page you need help with as there could be a couple of different ways to solve your problem.


hi sir, sorry for what i did. I am new here and i don't know how to delete what id post to correct my mistake. I am starting to learn.
I just copied the paragraph and put the name from whom it came and write my question below it.
I don't have any bad intension on it.
By the way. thanks for the advice.:) :)

mizkhyz
Newbie Poster
8 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You