This thread may be some what confusing, and not yet sure is this can be done or not.
I just get a an idea to this (and yet I am still learning, I am not expert) so I need your Help.
Thread: I am having a form and add the listbox/listview.
so Whenever I drag and drop Folder or Files then those folder and Files must be move to my own Exe App. (I don't want to create a resource folder. because my application is password protected, and reason is to hide folder and files)

Whenever I open the Application Then I will popup with all files and folder in Listbox/Listview. and on right click → unhide.
File get to it original place/ to the specific directory...

Is this type of things possible with the Visual Studio.?
Sorry, I think on this but I am not getting how can I do this.?
so No source code yet I tried.

ok, But how to implemenmt on my program (vb.net)
I search on youtube and google but I failed what I want or what you said...
So can you please elaborate the data that how I can implement ?

c93cf2cca6488324256a29d11d3292f9

when the user add a file,compress that file into a zip file and store it into a protected folder. and create a fake image of that file in your listview and store the directory info for each file in your app for later use..such as extracting.

1) how to zip files (extract,move)
2) how to protect a folder

1) reference the System.IO.Compression.FileSystem form /Windows/Microsoft.NET/assembly/GAC_MSIL/System.IO.Compression.FileSystem/System.IO.Compression.FileSystem.dll

Imports System.IO
Imports System.IO.Compression

Module Module1

    Sub Main()
        Dim startPath As String = "c:\example\start" 
        Dim zipPath As String = "c:\example\result.zip" 
        Dim extractPath As String = "c:\example\extract"

        ZipFile.CreateFromDirectory(startPath, zipPath)

        ZipFile.ExtractToDirectory(zipPath, extractPath)
    End Sub 

End Module

reference : ZipFile Class

2) Protect Folder

Imports System.Security.AccessControl
Imports System.IO

Remove access from folder

Dim FilePath As String = "The Folder you want to protect"
        Dim fs As FileSystemSecurity = File.GetAccessControl(FilePath)
        ' Please Change User if needed (C:\Users\"USER")
        fs.AddAccessRule(New FileSystemAccessRule("User", FileSystemRights.FullControl, AccessControlType.Deny))
        File.SetAccessControl(FilePath, fs)

Add access to folder

Dim FilePath As String = "The Folder you want to protect"
        Dim fs As FileSystemSecurity = File.GetAccessControl(FilePath)
        ' Please Change User if needed (C:\Users\"USER")
        fs.RemoveAccessRule(New FileSystemAccessRule("User", FileSystemRights.FullControl, AccessControlType.Deny))
        File.SetAccessControl(FilePath, fs)

Gd Luck

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.