Yo anyone able to help

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
8 posts Page 1 of 1
Contributors
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

Yo anyone able to help
muttley1968
i have been making a nice app launcher and it is like one snipit away from working i need to know how to make it soo if you drag an appication .exe into a listview how can i then make it add that to a folder


example

they drag in itunes.exe it adds it to my list view and allso to the desktop folder soo that the app can rember it on every launch
User avatar
AnoPem
VIP - Donator
VIP - Donator
Posts: 441
Joined: Sat Jul 24, 2010 10:55 pm

Re: Yo anyone able to help
AnoPem
Is this what your looking for ?
You do not have the required permissions to view the files attached to this post.
https://t.me/pump_upp
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

Re: Yo anyone able to help
muttley1968
Not exactly i am using this code in a listview to make it show desktop items it works and starts the program but i want to add a drag and drop feture soo that when it is added to the listview it also adds it to the desktop folder in the harddrive
Code: Select all
      Private Sub lwDesktop_ItemSelectionChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.ListViewItemSelectionChangedEventArgs) Handles lwDesktop.ItemSelectionChanged
        fileName = My.Computer.FileSystem.SpecialDirectories.Desktop + "\" + e.Item.Text
    End Sub
    Private Sub lwDesktop_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles lwDesktop.DoubleClick
        Process.Start(fileName)
    End Sub
    Dim fileName As String = ""
    Dim folderLocation As String = My.Computer.FileSystem.SpecialDirectories.Desktop
  For Each I In My.Computer.FileSystem.GetFiles(My.Computer.FileSystem.SpecialDirectories.Desktop)
            Dim Desktop_Icon_add As System.Drawing.Icon = Icon.ExtractAssociatedIcon(I)
            DesktopImages.Images.Add(Desktop_Icon_add.ToBitmap)
            I = I.Replace(My.Computer.FileSystem.SpecialDirectories.Desktop & "\", "")
            lwDesktop.Items.Add(I, DesktopImages.Images.Count - 1)
        Next
User avatar
AnoPem
VIP - Donator
VIP - Donator
Posts: 441
Joined: Sat Jul 24, 2010 10:55 pm

Re: Yo anyone able to help
AnoPem
muttley1968 wrote:
Not exactly i am using this code in a listview to make it show desktop items it works and starts the program but i want to add a drag and drop feture soo that when it is added to the listview it also adds it to the desktop folder in the harddrive
Code: Select all
      Private Sub lwDesktop_ItemSelectionChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.ListViewItemSelectionChangedEventArgs) Handles lwDesktop.ItemSelectionChanged
        fileName = My.Computer.FileSystem.SpecialDirectories.Desktop + "\" + e.Item.Text
    End Sub
    Private Sub lwDesktop_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles lwDesktop.DoubleClick
        Process.Start(fileName)
    End Sub
    Dim fileName As String = ""
    Dim folderLocation As String = My.Computer.FileSystem.SpecialDirectories.Desktop
  For Each I In My.Computer.FileSystem.GetFiles(My.Computer.FileSystem.SpecialDirectories.Desktop)
            Dim Desktop_Icon_add As System.Drawing.Icon = Icon.ExtractAssociatedIcon(I)
            DesktopImages.Images.Add(Desktop_Icon_add.ToBitmap)
            I = I.Replace(My.Computer.FileSystem.SpecialDirectories.Desktop & "\", "")
            lwDesktop.Items.Add(I, DesktopImages.Images.Count - 1)
        Next
Are you trying to make an rocket dock alike program ?
https://t.me/pump_upp
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

Re: Yo anyone able to help
muttley1968
sorta yes but mine has diffrent fetures i know how to make that system write to a text file but not put a copy of the .exe into a folder for it to read from
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

Re: Yo anyone able to help
muttley1968
sorry for double post but can anyone help
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4392
Joined: Tue Aug 04, 2009 1:47 am

Re: Yo anyone able to help
CodenStuff
Why are you copying the .exe file to a desktop folder?. I dont think that would be a good idea because a lot of software comes with dll's and resources required for it to work.

It would be better to save each exe location to a text file or even a string collection and use that instead of reading the contents from a folder.
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

Re: Yo anyone able to help
muttley1968
umm well yh you could do it that way but i mean like creating shortcuts to the desktop folder just like you would normall buy draging and droping it from start menu on just that is the way i have desined the code to get the programs icon
8 posts Page 1 of 1
Return to “Coding Help & Support”