How to Link a folder and file with Button/Menu List

Joined
Feb 3, 2015
Messages
8
Programming Experience
Beginner
Hi Experts,

I'm very new to VB.net. I'm making a form in VB.net. in that form I create a button and a menu list. I want to attach folder with button and PDF/MS word file with menu list.

when I click on the button my attached folder will open in that event and when I click on the menu list my attached file will open.

Hope I'm clear with my question.

Waiting for a expert reply on that.
 
For the menu items, you can store the file path in Tag property. You can then use a single method to handle the Click event for all menu items. In the event handler, the `sender` is the menu item that was clicked so you can get the file path from its Tag property and open it. For the Button, you could do the same but, if there's only one Button, you may as well just use a separate variable to store the folder path. In both cases, a call to Process.Start will do the opening.
 
How about, instead of that, you use the information I've already provided to make an attempt for yourself? If you run into issues then post back and show us what you've done so far and where the issue is.
 
Hi, I've attached a snapshot of the problem. plz correct it. Problem.jpg
 
Back
Top