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.
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
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
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
Is this what your looking for ?
You do not have the required permissions to view the files attached to this post.
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
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 harddriveAre you trying to make an rocket dock alike program ?
Code: Select allPrivate 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
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
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.
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.
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
Copyright Information
Copyright © Codenstuff.com 2020 - 2023