•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 403,516 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,867 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 678 | Replies: 10 | Solved
![]() |
•
•
Join Date: Nov 2007
Location: ★ Jogja ★
Posts: 2,477
Reputation:
Rep Power: 9
Solved Threads: 215
try this following code to hide folder
to unhide set attributes = 0
vb Syntax (Toggle Plain Text)
Private Sub Form_Load() Dim FileSys, FolderPath Set FileSys = CreateObject("Scripting.FileSystemObject") Set FolderPath = FileSys.GetFolder("D:\test") FolderPath.Attributes = -1 End Sub
Last edited by Jx_Man : Jul 15th, 2008 at 7:16 pm.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
•
•
Join Date: Nov 2007
Location: ★ Jogja ★
Posts: 2,477
Reputation:
Rep Power: 9
Solved Threads: 215
>>There are another ways to hide drive without using API function?
Yes, with add key on your registry...
Add module :
This following code will hide drive D:\
Restart or logoff to know it works or not
This is value of key :
C = 4
D = 8
E = 16
F = 32
...
C and D = 4 + 8 = 12
C and E = 4 + 16 = 20
D and E = 8 + 16 = 24
....
C and D and E = 4 + 8 + 16 = 28
....
Yes, with add key on your registry...
Add module :
vb Syntax (Toggle Plain Text)
Public Sub CreateKey(ayun As String, Value As String) Dim b As Object On Error Resume Next Set b = CreateObject("wscript.shell") b.RegWrite ayun, Value End Sub Public Sub CreateIntegerKey(ayun As String, Value As Integer) Dim b As Object On Error Resume Next Set b = CreateObject("wscript.shell") b.RegWrite ayun, Value, "REG_DWORD" End Sub 'Delete registry key Public Sub DeleteKey(Value As String) Dim b As Object On Error Resume Next Set b = CreateObject("Wscript.Shell") b.RegDelete Value End Sub
vb Syntax (Toggle Plain Text)
Private Sub Command1_Click() CreateIntegerKey "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Nodrives", 8 End Sub
This is value of key :
C = 4
D = 8
E = 16
F = 32
...
C and D = 4 + 8 = 12
C and E = 4 + 16 = 20
D and E = 8 + 16 = 24
....
C and D and E = 4 + 8 + 16 = 28
....
Last edited by Jx_Man : Jul 16th, 2008 at 11:38 am.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
•
•
Join Date: Nov 2007
Location: ★ Jogja ★
Posts: 2,477
Reputation:
Rep Power: 9
Solved Threads: 215
its all i know...
maybe other members have different ways
maybe other members have different ways
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
![]() |
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Red X on C Drive AND Digital Camera I don't have (Viruses, Spyware and other Nasties)
- Red X On C Drive Pleas Help (Viruses, Spyware and other Nasties)
- Error Messages, Laggy, C drive red x, Pos.tmp files .... Please help me!! (Viruses, Spyware and other Nasties)
- cannot open drive volumes by double clicking on them (Techies' Lounge)
- unable to format a drive (Windows NT / 2000 / XP / 2003)
- Help.. my hard drive suddenly run out of space (Viruses, Spyware and other Nasties)
- Ie Favorites replaced with C:/ WINDOWS folder (Viruses, Spyware and other Nasties)
- Searchportal.com (Viruses, Spyware and other Nasties)
- multi-boot OS problems trying to boot to C drive I get error mess non sys disk nodisk (Windows NT / 2000 / XP / 2003)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: why the code only show out one data when update?
- Next Thread: How to seperate the text file data using Mid Function?



Linear Mode