Google Answers Logo
View Question
 
Q: VB.6.0 code for Project DriveListBox-how to unhide hidden "folder" on floppy dis ( No Answer,   2 Comments )
Question  
Subject: VB.6.0 code for Project DriveListBox-how to unhide hidden "folder" on floppy dis
Category: Miscellaneous
Asked by: yana-ga
List Price: $2.00
Posted: 21 Oct 2002 01:24 PDT
Expires: 20 Nov 2002 00:24 PST
Question ID: 85792
Hi! Please read this : 
 
All I need the code, how to unhide hidden folder on "FLOPPY DISKETTE"
in this Project..
                                                     **************** 
 
Please Help Me to resolve the problem. I will send this message for
the last time.
     
Private Declare Function GetDriveType Lib "kernel32" _ 
        Alias "GetDriveTypeA" (ByVal nDrive As String) As Long 
Private Declare Function GetDiskFreeSpace Lib "kernel32" _ 
        Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, _ 
        lpSectorsPerCluster As Long, lpBytesPerSector As Long, _ 
        lpNumberOfFreeClusters As Long, _ 
        lpTtoalNumberOfClusters As Long) As Long 
Private Declare Function GetCurrentDirectory Lib "kernel32" _ 
        Alias "GetCurrentDirectoryA" (ByVal lpBufferLength As Long, _ 
        ByVal lpBuffer As String) As Long 
Private Declare Function GetWindowsDirectory Lib "kernel32" _ 
        Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, _ 
        ByVal nSize As Long) As Long 
         
Const DRIVE_CDROM = 5 
Const DRIVE_FIXED = 3 
Const DRIVE_RAMDISK = 6 
Const DRIVE_REMOTE = 4 
Const DRIVE_REMOVABLE = 2 
 
Private Sub Closebmp_Click() 
lblClosebmp.Visible = False 'hide 
lblBmp.Visible = True ' show 
End Sub 
 
Private Sub Drive1_Change() 
Dir1.Path = Drive1.Drive 
Dim drivetype As Long 
Dim freespace As Long, Sectors As Long 
Dim Bytes As Long 
Dim freeClusters As Long, totalClusters As Long 
Dim retValue As Long 
Dim buffer As String * 255 
Dim DName As String 
 
    Screen.MousePointer = vbHourglass 
    DoEvents 
    DName = Left(Drive1.Drive, 2) & "\" 
    drivetype = GetDriveType(DName) 
    Select Case drivetype 
        Case 0 
           Label5.Caption = "UNDETERMINED" 
        Case DRIVE_REMOVABLE 
           Label5.Caption = "REMOVABLE" 
        Case DRIVE_FIXED 
           Label5.Caption = "FIXED" 
        Case DRIVE_REMOTE 
           Label5.Caption = "REMOTE" 
        Case DRIVE_CDROM 
           Label5.Caption = "CDROM" 
        Case DRIVE_RAMDISK 
           Label5.Caption = "RAMDISK" 
End Select 
'Get free space 
retValue = GetDiskFreeSpace(DName, Sectors, Bytes, _ 
           freeClusters, totalClusters) 
            
Label6.Caption = Sectors * Bytes * freeClusters 
Screen.MousePointer = vbDefault 
DoEvents 
Debug.Print App.Path 
 
End Sub 
 
Private Sub File1_Click() 
Dim strFilePath As String 
'Query the option buttons to see which one 
'has been checked. 
'Show the bitmap graphic 
picDisplay.Picture = picBitmap.Picture 
'OptList.Value = True 
'Assign the exact path of the graphic in the file 
'list box to the strFilePath string variable. 
'Don't forget, to get the string in a list box 
'you must identify the Listindex selected within 
'a List Control's List array. 
strFilePath = File1.Path & "\" _ 
& File1.List(File1.ListIndex) 
'Load the picture from disk and assign it to the 
'picture property of the Picture control. 
picDisplay.Picture = LoadPicture(strFilePath) 
End Sub 
 
Private Sub Command1_Click() 
    End 
End Sub 
 
Private Sub Dir1_Change() 
File1.Path = Dir1.Path 
 
End Sub 
 
Private Sub Form_Load() 
Drive1_Change 
File1.path = App.path
 


--------------------------------------------------------------------------------

Request for Question Clarification by sgtcory-ga on 21 Oct 2002 09:44 PDT
Hello yana,

I was under the impression that you could not show hidden files from a
VB app into a directory Listbox so long as the end user has this
function disabled. I am looking for documentation on this, and will
post my findings.

Here is a linked example of someone that wrote some code, with
comments on the line where the 'strTemp' is being created. ( This is a
Google cached page )

http://216.239.51.100/search?q=cache:cOh_-__CAiYC:www.vbcity.com/forums/topic.asp%3Ftid%3D2635+%22not+show+hidden+files%22+vb+6&hl=en&ie=UTF-8

As always - I will keep my eyes open for more documentation.

- SgtCory
Answer  
There is no answer at this time.

Comments  
Subject: Re: VB.6.0 code for Project DriveListBox-how to unhide hidden "folder" on floppy dis
From: aceresearcher-ga on 21 Oct 2002 01:48 PDT
 
Can you tell us whether you know for sure the folder is on your
diskette, and if so, how you know that it is there?

In Windows Explorer, after clicking on "3-1/2 Floppy (A:)" did you
pull down the "View" Menu, select "Folder Options", and check the box
"Show All Hidden Files?" (from omniscientbeing-ga)

Do you Have "Norton Utilities" or some other troubleshooting software?
(from probonopublico-ga)

By answering these questions, you will assist Researchers in obtaining
a solution for you. *** If you do not answer these questions, it will
be extremely difficult for Researchers to help you. *** That is why
your previous questions were not answered.

https://answers.google.com/answers/main?cmd=threadview&id=85586
https://answers.google.com/answers/main?cmd=threadview&id=85151
Subject: Re: VB.6.0 code for Project DriveListBox-how to unhide hidden "folder" on floppy dis
From: slk-ga on 30 Oct 2002 17:52 PST
 
SETATTR "A:\*.*", vbNormal

Note that most of the stuff you are doing via the Windows API can be
done directly in VB with the DIR function. If you want to make sure
you only unhide folders (and not, for example, system files) then use
the DIR function with the attribute to retrieve only folders, and step
through in a WHILE loop sending each name to SETATTR to unhide it.

Good luck!

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy