Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello everyone!!!

Can you please help me about my problem. I think this is very easy but I cannot figure out on how to do this.

I have created an application on my computer using Visual Studio 2008 and running on a windows 7 OS. My problem is I want to access the picture file on a network drive (say a LAN server with IP: 10.0.0.1).

This is my code, and it will execute when I pressed a button.

VB
PictureBox1.Image = Image.FromFile("\\10.0.0.1\C$\Image\picture.jpg")


I am trying to display the picture.jpg on my computer. What really seems to be the problem.

I Really Need Your help...thanks in advance..
Posted
Comments
Sergey Alexandrovich Kryukov 9-Feb-13 12:40pm    
Your work if fundamentally wrong. Stop hard-coding anything, be happy. Did you get my answer to the previous question.
—SA

1 solution

C$ is only assessable by the administrator, so you should start by sharing the image folder directly with read access for everybody.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 9-Feb-13 12:38pm    
Correct, but the main issue of OP is hard-coding path. This is the second question, and probably my answer did not help OP. Please see:

http://www.codeproject.com/Answers/543196/AccessplusDeniedplusonplussomeplusWindowsplus7plus#answer1

—SA
Mehdi Gholam 9-Feb-13 14:20pm    
I've given up trying to show people how to use knives and forks, when they seem to be stuck on chewing before swallowing :)
Sergey Alexandrovich Kryukov 9-Feb-13 14:41pm    
A fair point. :-)
I would rather said "stuck on swallowing before they learn chewing". :-)
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900