show all hidden Files (with vb6)

Untuk memunculkan semua file yang tersembunyi didalam suatu folder caranya sangat mudah

1. Buat sebuah form baru

2. Tambahkan Sebuah Dirlistbox (Dir1)

3. Tambahkan Sebuah FileListBox (File1)

4. Tambahkan sebuah DriveListbox (Drive1)

5. Klik ganda Drive1 dan isikan :

Dir1.path = drive1.drive

File1.path = Dir1.path

6. Klik ganda Dir1 dan isikan:

File1.path = dir1.path

7. Klik dua kali form dan isikan

File1.hidden = true

File1.system = true

sehingga hasilnya akan seperti ini:

Private sub Form_load()

File1.hidden = true

File1.system = true

end sub

8. Terakhir tambahkan sebuah command button dan klik dua kali

isikan :

dim I as integer

For i = 0 to file1.listcount – 1

SetAttr Dir1.path & “\” & file1.list(i) , vbnormal

next

sehingga hasilnya akan seperti ini

Private sub form command1_(click)

dim I as integer

For i = 0 to file1.listcount – 1

SetAttr Dir1.path & “\” & file1.list(i) , vbnormal

next

end sub


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.