When I hit the Insert button, the common dialog come out at the specific path location
Code:
CommonDialog1.InitDir = "c:\Project\data"
but it able to browse the data at other path location by using drop down menu in look in combo box.How to disable the drop down menu in look in combo box?I just want it able to access the spesific location in folder directory.Have an Idea?
Last edited by matrik02; May 22nd, 2007 at 12:55 AM.
The Question is, if I use DirListbox, I don't want the user access other directory outside the c:\Project\Data, The user are allow to access the directory inside the Data folder.However, if use DirListbox, the user still able to browser in C: directory. I just want the user able to browse and access the directory and folder inside this location c:\Project\Data.
Actually, When I use Dirlistbox and filelistbox, I able to access the data folder and the data file inside the data folder. This fine and allow it . I don't want the user access the data file outside of the path location C:\Project\Data by click dirlistbox and select C:\ . This method able the user to browse the data outside of the specific path location for example C:\Windows.
I want the users are allow to access the data folder and the directory inside the path location C:\Project\Data only.Have any idea?
Code:
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Form_Load()
Dir1.Path = "C:\Project\Data"
File1.Path = Dir1.Path
End Sub
Last edited by matrik02; May 22nd, 2007 at 07:44 AM.
Reason: for get to attach the image
Now, I cannot see the data in the filelistbox inside the data folder. For you information, I want the user also able to access all directory and its file as long as the the directory are inside the data folder
for example C:\Project\Data\Soil, C:\Project\Data\Map C:\Project\Data\Nutrient, C:\Project\Data\Ma\P
At the moment, I just able to see the data file in data folder but not able to see the data file inside the data folder directory example C:\Project\Data\Map
User are not allow to see and access all data file in its directory execept the the data store in the location C:\Project\Data and it directory, Folder name 'DATA' iin the path location C:\Project\Data act as a parent in this case.
because I want to make it easier to find the data at the spesific location and browse the data inside the data folder only.
If I remove it, I unable to see the file inside the C:\Project\Data\K for example.
Code:
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
At the moment, I am able to see the file in the C:\Project\Data only.
If I don't remove the code below, I can able to browse the file inside C:\Project\Data but also able to see the data file outside the folder structure.
Code:
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
I don't want them browse outside of this folder structure
here all the code
Code:
Private Sub Form_Load()
Dir1.Path = "C:\Project\Data"
File1.Path = Dir1.Path
End Sub
Last edited by matrik02; May 22nd, 2007 at 09:00 AM.
Sorry if my english is not good enough to able you to answer my questions
Aswser question 1
Originally Posted by Hack
If you permit them to open one folder, then they are going to be able to open them all.
If I permit the to open one folder in the form load
Dir1.Path = "C:\PROJECT\Data", I able to see the file of the Data folder in filelistbox. But If change the directory in the Dirlistbox for example C:\PROJECT\Data\K, the file of that folder is not change in filelistbox. It still remain.
Answer question for question 2
because I want to make it easier to find the file at the spesific location and also able to browse the directory of the folder inside data folder only.