I have windows form have 3 controls
1-textbox1
2-button
3-picture box1
what i need is to display image in picture box1 when i press button
to show the file name that written in textbox by searching the file in shared folder in network and if found it show it
example
I have shared folder"D:/images" have all permissions and is accessible found in server 192.168.1.10 and it shared folder and have all pictures to all employee
What i need is when i write 111 in textbox1 and press button then it will go search in folder images"D:/images" found in network in server 192.168.1.10 and search for file that have 111 image
if it found show it in picture box1
Are this possible?
I need code by c# to make or achieve this task above.
thanks

Using System.IO you can use the Directory class to get a string array of all files in a directory. Then you can check the array for the file name you need to see if it exists.
Once you know it exists you can use the URI as the source for the picture box.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.