Hi all,
i want to protect folder, files & application by password using VB can anydody help me how to do this.
pradip
Hi all,
i want to protect folder, files & application by password using VB can anydody help me how to do this.
pradip
So you want to have a password form popup whenever the user wants to open a file or directory, or specified files? That's gonna be hard.
I think someone else asked this a few weeks ago. Try searching these forums for that tread, and see what solutions were provided.
Hi
I am not getting reply from any one about that could u pls help me.
See if this helps you:
VB Code:
Private Const FILE_NOTIFY_CHANGE_ATTRIBUTES = &H4 Private Const FILE_NOTIFY_CHANGE_DIR_NAME = &H2 Private Const FILE_NOTIFY_CHANGE_FILE_NAME = &H1 Private Const FILE_NOTIFY_CHANGE_SIZE = &H8 Private Const FILE_NOTIFY_CHANGE_LAST_WRITE = &H10 Private Const FILE_NOTIFY_CHANGE_SECURITY = &H100 Private Const FILE_NOTIFY_CHANGE_ALL = &H4 Or &H2 Or &H1 Or &H8 Or &H10 Or &H100 Private Declare Function FindFirstChangeNotification Lib "kernel32" Alias "FindFirstChangeNotificationA" (ByVal lpPathName As String, ByVal bWatchSubtree As Long, ByVal dwNotifyFilter As Long) As Long Private Declare Function FindCloseChangeNotification Lib "kernel32" (ByVal hChangeHandle As Long) As Long Private Declare Function FindNextChangeNotification Lib "kernel32" (ByVal hChangeHandle As Long) As Long Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long Private Declare Function ResetEvent Lib "kernel32" (ByVal hEvent As Long) As Long Private Sub Form_Load() 'KPD-Team 2000 'URL: [url]http://www.allapi.net/[/url] 'E-Mail: [email][email protected][/email] Dim Ret As Long 'Set the notification hook Ret = FindFirstChangeNotification("C:\", &HFFFFFFFF, FILE_NOTIFY_CHANGE_ALL) 'Wait until the event is triggered WaitForSingleObject Ret, &HFFFFFFFF Debug.Print "Event Triggered for the first time" Beep 'Reactivate our hook FindNextChangeNotification Ret 'Wait until the event is triggered WaitForSingleObject Ret, &HFFFFFFFF Debug.Print "Event Triggered for the second time" Beep 'Remove our hook FindCloseChangeNotification Ret End Sub
I have a program with that you can lock unlock any folder.
If you wnat I can mail it to you.
do you have the source code of it as well??Quote:
I have a program with that you can lock unlock any folder.
If you wnat I can mail it to you.
hi jyotiraditya,
could u pls. send me the application.
pradip
hi jyotiraditya,
thank's for sending me a nice app. & it is working fine in my pc. i think i know the logic of the app. & this will not serve my purpose.
because here the app. is changing the directory type to a shortcut file & renaming it with some algo.
in this way i can't protect my system or program files directory. but i want to protect the system directory from dos prompt as well as network.
if u can help me i will be thank full to u.
pradip
This won't work for a folder but you could encrypt the file that you want to protect, and open the file in your own program that asks for the password then decrypts the file
you can make a special encrypted file with all the files in a folder and then make a link to your program with the parameters of the file and then your program asks for the password and if it's ok the program will browse the encrypted file!
Hi apradip,
I do not if this could help you...
dim a as string
a= "c:\xyz\pwq"
mkdir(a)
call setattr(a,vbSystem + vbHidden)
'// hope this helps
take care,
Harold Bright