|
-
Nov 1st, 2002, 01:54 AM
#1
Thread Starter
Lively Member
how to protect folder, files & application by password using VB
Hi all,
i want to protect folder, files & application by password using VB can anydody help me how to do this.
pradip
Pradip Adhikari

-
Nov 1st, 2002, 04:22 AM
#2
Banned
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.
-
Nov 1st, 2002, 06:12 AM
#3
Thread Starter
Lively Member
pls. help me
Hi
I am not getting reply from any one about that could u pls help me.
Pradip Adhikari

-
Nov 1st, 2002, 06:46 AM
#4
PowerPoster
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]
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
-
Nov 1st, 2002, 06:49 AM
#5
Member
I have a program with that you can lock unlock any folder.
If you wnat I can mail it to you.
Jyotiraditya Rath
http://myvbhome.tripod.com
-
Nov 1st, 2002, 06:53 AM
#6
PowerPoster
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??
-
Nov 5th, 2002, 12:01 AM
#7
Thread Starter
Lively Member
pls. send me
hi jyotiraditya,
could u pls. send me the application.
pradip
Pradip Adhikari

-
Nov 8th, 2002, 03:00 AM
#8
Thread Starter
Lively Member
thanks for thr app.
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
Pradip Adhikari

-
Dec 5th, 2002, 03:21 PM
#9
Member
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
-
Mar 18th, 2003, 06:21 AM
#10
Fanatic Member
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!
Best Regards,
seec77
If you helped me, cosinder yourself thanked.
Get each and every Garfield strip here!
Here you can get all Calvin & Hobes strips!
Damn UComics! It was probably unprofitable for them to allow us to just download Garfield and Calving & Hobes strips... so they made folder indexing unallowed on their server!!!
I am 33% addicted to Counterstrike. What about you?
I am 23% addicted to Star Wars. What about you?
I am 0% addicted to Tupac. What about you?
-
Mar 20th, 2003, 01:12 PM
#11
Member
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
Failures are divided into two classes --
those who thought and never did, and those who did and never thought.
- John Charles Salak
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
|