|
-
Dec 8th, 2009, 03:56 PM
#1
Thread Starter
New Member
Is this possible to be created?
Hi, I am wondering if it would be possible to create a program that upon being launched it would scan the contents of a designated folder residing in the same directory as the exe file and upon finding any files in that folder it would add them to the form as buttons that could be clicked to open those files.
As an example: if a text file (hello world.txt) and an mpeg file (my movie.mpg) are inside the folder upon double clicking the exe and launching the program, they would appear on the form as two buttons; one would be named "hello world.txt" and the other "my movie. mpg") with or without the extension letters.
Once one button is clicked, the file would open in notepad or WMP.
The way I envision this program is as a dynamic program that would add or subtract buttons every time it is launched depending on the files inside the folder.
Using VB 2008.
thank you for your input
silvio facchin
{email removed}
-
Dec 8th, 2009, 04:15 PM
#2
Re: Is this possible to be created?
In short, yes it's possible.
Using a DirectoryInfo class and the FileInfo class, it would be very easy to do.
-tg
-
Dec 8th, 2009, 04:37 PM
#3
Thread Starter
New Member
Re: Is this possible to be created?
thank you for your reply, I am very new to all this; would you mind elaborating on how to exactly do it?
thank you again.
silvio.
-
Dec 14th, 2009, 05:33 AM
#4
Re: Is this possible to be created?
@silvideo: Do you want help in making this or do you want someone to make it for you?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Dec 14th, 2009, 10:06 AM
#5
Thread Starter
New Member
Re: Is this possible to be created?
I would appreciate if someone could write it for me.
-
Dec 15th, 2009, 05:48 AM
#6
Lively Member
Re: Is this possible to be created?
I can get on that tomorrow. Should only take a few minutes.
-
Dec 16th, 2009, 10:50 AM
#7
Hyperactive Member
Re: Is this possible to be created?
Hi Silvideo,
I don't know if JoshHilton made your application already, but I've made one as well. It was a good exercise and fun to do so couldn't resist it . I uploaded it to rapidshare:
http://rapidshare.com/files/321675249/Silvideo.zip
Hope you like it!
ps: I didn't use buttons, hope you don't mind. I think this is much more user friendly then a load of buttons. If you still want them, let me know.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|