I am creating 1 textbox and 1 button. A button is open a file contain database (.mdb) and textbox is shown the directory.
Example : C:\ TEST.mdb
I want to copy the directory in the first time and when I open the program in the second time the textbox is shown the directory in the first time.
That is what the program installer is supposed to do. The only way to do it would be to check for a db file that hasn't been copied, and replace the valid one. Suppose someone copies a file there two years later? You'd lose your DB when the app started "first time" again.
IMO the OP wanted to say PATH instead of Directory
In button click event he :
wants to open the mdb typed in the textbox
wants to save the path
and retrieve and show the path every time the program is executed
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...