954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how do you get the directory witch the program is instaled in

how do you get the directory witch the program is instaled in ?
and put it in code e.g.

textbox1.text = (******get directory code*******)

scrypt3r
Junior Poster
114 posts since Aug 2007
Reputation Points: 6
Solved Threads: 2
 

Hello scrypt3r...

i don't know witch program directory u want to know, the other program or your program?

if your program, try this code:

MessageBox.Show(My.Computer.FileSystem.CurrentDirectory)

YHUBZ
Newbie Poster
7 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

If it's your program, then you could also try :

textbox1.text = My.Application.Info.DirectoryPath


This would get the directory of the EXE of your program.

mazel
Newbie Poster
3 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You