[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 134
  • Last Modified:

accessing network drive

I have a few computers on network using tcp/ip protocol.
my computer name is Computer1 ohter computer is Computer2
Computer2 has one folder shared it's name is Photo.
How can i access the files in photo through Vbasic4.
I tried this
picpath = "computer2:\c\photo\"
Picture1.Picture = LoadPicture(picpath & "test.jpg")
That didn't work :o(

0
jerbell
Asked:
jerbell
1 Solution
 
mdouganCommented:
Try:

picpath = "\\computer2\photo"

but depending on how sharing is set up on computer2 you may or may not have permission to access that directory.

If you are really stuck, and you are always going to be accessing the same directory on the same computer, you can map one of computer1's drives to the photo directory on computer2 in which case you code could be as simple as:

(assuming that you have mapped E: to be \\computer2\photos)

Picture1.Picture = LoadPicture("E:\test.jpg")

Of course, I'm not even sure you can load a jpg into a picture box.

MD
0
 
jerbellAuthor Commented:
Perfect thanks for answer!!!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now