Parsi Coders
سورس مخفی کردن پوشه vb6 - نسخه قابل چاپ

+- Parsi Coders (http://parsicoders.com)
+-- انجمن: Software Development Programming (http://parsicoders.com/forumdisplay.php?fid=37)
+--- انجمن: Visual Basic Programming (http://parsicoders.com/forumdisplay.php?fid=39)
+---- انجمن: Visual Basic 6 (http://parsicoders.com/forumdisplay.php?fid=44)
+---- موضوع: سورس مخفی کردن پوشه vb6 (/showthread.php?tid=1387)



سورس مخفی کردن پوشه vb6 - Amin_Mansouri - 12-30-2011

با سوری میتونید یک فولدر یا پوشه رو مخفی کنید:

Using:
FileSystemObject
Require:
Microsoft Scripting Runtime
or
C:\WINDOWS\System32\scrrun.dll


so using attributes of the folder we hide it and by giving it a different name from the one he have it will not be even able to access it from Command Prompt. So here is the code for hiding

کد:
Private Sub Command1_Click()




    Dim FS As New FileSystemObject



    strPath = "E:\TestFolder"



    Name strPath As strPath & "A"



    Set F = FS.GetFolder(strPath & "A")

    f.Attributes = -1


End Sub

سورس 2 :

کد:
Private Sub Command2_Click()



    Dim fs As New FileSystemObject


    Dim f


    Dim strPath As String




    strPath = "E:\TestFolder"



    f.Attributes = 0


    Name strPath & "A" As strPath


End Sub