• We just launched and are currently in beta. Join us as we build and grow the community.

Hide Folder in VB.NET

merzebudro

Ethereum Expert
M Rep
0
0
0
Rep
0
M Vouches
0
0
0
Vouches
0
Posts
150
Likes
93
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
Today, I will teach you how to create a program that can hide folder in VB.NET.

Now, let's start this tutorial!

1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application.

2. Next, add only one Button named Button1 and labeled it as "Browse Folder to Hide" and FolderBrowserDialog named as FolderBrowserDialog1 for browsing a folder. You must design your interface like this:

hidefolder.png


3. Next, we will code for clicking the Button.

Here's the code:

  1. Private

    Sub

    Button1_Click(

    ByVal

    sender As

    System.

    Object

    , ByVal

    e As

    System.

    EventArgs

    )

    Handles

    Button1.

    Click
  2. Dim

    FolderToHide As

    String
  3. If

    FolderBrowserDialog1.

    ShowDialog

    =

    Windows.

    Forms

    .

    DialogResult

    .

    OK

    Then
  4. 'Choose the Folder To Hide
  5. FolderToHide =

    FolderBrowserDialog1.

    SelectedPath

    .

    TrimEnd

  6. Dim

    ToHideDir As

    New

    System.

    IO

    .

    DirectoryInfo

    (

    FolderToHide)
  7. 'Then Change the Attribute To Hidden Which will Hide the Folder
  8. ToHideDir.

    Attributes

    =

    IO.

    FileAttributes

    .

    Hidden
  9. End

    If
  10. End

    Sub

As you can see the above code, we only trigger to use the IO.FileAttributes.Hidden to hide the folder to its directory.

Choose any folder from your pc then it will hide it.

For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.

Best Regards,

Engr. Lyndon Bermoy
IT Instructor/System Developer/Android Developer/Freelance Programmer
Mobile: 09488225971
Landline: 826-9296
E-mail:[email protected]

Add and Follow me on Facebook: https://www.facebook.com/donzzsky

Visit and like my page on Facebook at: https://www.facebook.com/BermzISware

 

452,292

323,341

323,350

Top