Results 1 to 6 of 6

Thread: showing n hideing files

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    226

    showing n hideing files

    how do i make it so if i click cmdbutton1 then i can see hidden files and if i click cmdbutton2 then i can hide files. if ur going to ask y then here is ur answer im just curtious and is it also possible to hide them so that only the vb program can find n see them?

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: showing n hideing files

    Quote Originally Posted by Ebiru
    ... i can see hidden files and ... then i can hide files. ...
    See and hide where? What control do you use to browse your files?
    In case you just want to know how then you may use SetAttr Statement in VB:
    VB Code:
    1. Private Sub Command1_Click()
    2. Static blnHidden As Boolean
    3.  
    4.     blnHidden = Not blnHidden
    5.     SetAttr "c:\temp\test.txt", IIf(blnHidden, vbHidden, vbNormal)
    6.  
    7. End Sub

  3. #3
    Fanatic Member lerroux's Avatar
    Join Date
    Nov 2005
    Location
    Welcome to the darkside... we have cookies
    Posts
    646

    Re: showing n hideing files

    come to think of it, i never encountered a vb app like that... but i think it's possible... but i dont think windows can't find it... it will still be regarded as hidden... i think... i'll try a search though...
    WARNING: Excessive coding is dangerous to your health... if symptoms persist insult your doctor...

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: showing n hideing files

    Quote Originally Posted by Ebiru
    it also possible to hide them so that only the vb program can find n see them?
    No. In fact, you can't hide them at all if someone has their Windows Explorer configured to "Show All Files" (as do I and most people I know.)

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    226

    Re: showing n hideing files

    Quote Originally Posted by Hack
    No. In fact, you can't hide them at all if someone has their Windows Explorer configured to "Show All Files" (as do I and most people I know.)
    ok but is there a way to just hide it (ps i know how to hide them w/o vb)

  6. #6
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: showing n hideing files

    There is NO (easy) way to hide a file. You can use FolderLock or similar 3rd party apps, but writing one is another story.

    Just for prank, you can do this,
    Create a new filetype and associate that type with a full transparent icon. Windows will not show the icon.
    For the filename, use the No-break Space character (Keystroke Alt+0160). (But your users still can find it by a search)

    Another option may be using the Alt+255 character from 16bit DOS Mode. (will work only in FAT32 partitions) In this case the file will be visible, but Windows will not be able to access it. But anyone with good DOS knowledge will be able to break it in a few minutes.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width