|
In SetListViewItems() method comment these lines in the ForEach loop :
|
|
|
|
|
Hi,
I don't know if the control already give a function like the one I'll give now, but if it's that case, just tell me.
public void RunSelectedFileItems()
{
if (this.SelectedFileCount > 0)
{
System.Diagnostics.Process proc;
foreach(LivingObjects.Windows.Forms.FileListViewItem file in this.SelectedFileItems)
{
proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = file.FileInfo.DirectoryName + "\\" + file.Text;
proc.Start();
}
}
}
private void fileSystemListView1_ItemActivate(object sender, System.EventArgs e)
{
try
{
this.fileSystemListView1.RunSelectedFileItems();
}
catch(System.Exception ex)
{
MessageBox.Show(ex.Message);
}
}
|
|
|
|
|
Any one implmeted this in vb.net I mean written the entire code in vb.net?
If so can you post it thnaks
|
|
|
|
|
Hi
I managed to convert Furty's FolderTreeView to vb.net with extension of a ListView like in windows explorer. It even check for duplicate icons. Problem starts when there are many files or folder under the selected folder (selected path). It takes all the resources....
So I try now to implement it with the help of this article (...which again requires converting to vb.net), and hope that the System ImageList will solve the resource problem.
If someone already implement it in VB.Net, could you please e-mail me the source (eelises@yahoo.com).
I'll let you know once it works for me.
Thanks guys for the invaluable help!
:::::::::::::::::::::::::::
OMG!! They killed Kenny!
You B------s!!!
:::::::::::::::::::::::::::
|
|
|
|
|
If I build the project with VS.NET 2005 Beta, the icons don't show up when I run the sample program. Anyone know how to fix this?
|
|
|
|
|
I've been struggling with this too. Creating a UserControl in VS.NET 2003 and referencing the dll in C# 2005 Beta still causes the same problem.
I've had no luck solving it.
Cheers,
Paul Wilson
|
|
|
|
|
A quick hack...
Move:
SystemImageListHelper.SetListViewImageList(this, _largeImageList, false);
SystemImageListHelper.SetListViewImageList(this, _smallImageList, false);
...from its current location to the top of Initialize() in the FileSystemListView class.
Cheers,
Paul Wilson
|
|
|
|
|
greate control!!!
thanks for solution, it works!!!!
|
|
|
|
|
Brilliant!! Still works for VS2008. Guess timing is everything. I got out Spy++ and everything and still had no clue. I wonder if the ListView handle moves when it gets displayed...?
|
|
|
|
|
Cool resource, but what files do I need to include in my project in order to implement this functionality? How do I include the file system?
|
|
|
|
|
You have to open the project, compile it as an release and then imprt the generated *.dll in to your components.
That did the trick for me.
|
|
|
|
|
|
Great control,
but is it possible (and so, how) to set a base directory (like "c:\MyFolder").
I want to show the user only the files in a specific folder (directory).
Thanks in advance.
|
|
|
|
|
Not sure if you still need this, but add the following function to FileSystemListView.cs and feed it a path:
public void DisplayFolder(string spath)
{
Shell32.Shell shell32 = new Shell32.ShellClass();
Shell32.Folder shell32Folder = shell32.NameSpace(spath);
SetListViewItems(shell32Folder);
}
Cheers!
|
|
|
|
|
Hi
Just a quick question.
Is there a simple way to implement subj. to a listview. (hold down the mouse button and select multiply items from a listview). i can see that your project supports this.
How?
MTP
|
|
|
|
|
Hi. I tried to take the file from your control and add them to a new project. I changed the namespaces and I get the following error:
An exception occurred while trying to create an instance of FileList.FileSystemListView. The exception was "Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "FileList.Labels.resources" was correctly embedded or linked into assembly "MP3Gery".<br />
baseName: MP3Gery.Labels locationInfo: <null> resource file name: FileList.Labels.resources assembly: FileList, Version=1.0.1463.27870, Culture=neutral, PublicKeyToken=null".
Any idea what that means?
Dave
|
|
|
|
|
This error should be raised by the class ResourceFactory (ResourceManager property)
1) Make sure you changed the namespaces in the classes contained in the Resources folder in the solution
2) Make sure you changed the Default namespace and Assembly name properly in the project properties
3) Inspect this line in the ResourceFactory.ResourceManager property:
_rm = new ResourceManager(resxNamespace + ".Labels", System.Reflection.Assembly.GetExecutingAssembly());
The first parameter must be equal to: [default namespace].Resources.Labels
Hope this help.
|
|
|
|
|
OOOOH !!
That take me about 1 hour scratching ma head about this f**k**g error.
Finally, it's really the third line who are responsible of that bug.
After understand that the code is trying to looking for embedded resources and, at evidence, found nothing about Labels's ressources, I used this little tool : .NET ResourceExplorer
After looking at the content, OOH! What stupifying suprise !!! The embedded ressources supposely be at the namespace (...).Resources.Labels are finaly in (...).Resources.ExplorerListViewLabels... just like the internal class in Labels.cs !
So, the line :
_rm = new ResourceManager(resxNamespace + ".Labels", System.Reflection.Assembly.GetExecutingAssembly());
must be changed to :
_rm = new ResourceManager(resxNamespace + ".ExplorerListViewLabels", System.Reflection.Assembly.GetExecutingAssembly());
That's all !
Great control !
|
|
|
|
|
I need to have a File Browser in my Console App written in C#. Any ideas how to use your control in my Console App.
Great job by the way, and thanks a ton!
|
|
|
|
|
What do you need exactly? This a Windows Control and cannot be displayed in a console application window.
But your Console app could open a Window that contains the control...
|
|
|
|
|
Hello
I would like to implement sorting. When I set sorting in the ListView to SortOrder.Ascending for example the images are not displayed. How do I get the images to go with the sorted ListViewItems?
|
|
|
|
|
Hrrm, I can't drag file out for some reason, it will accept drops but not draggin? Am I missing something?
|
|
|
|
|
The control does not support drag and drop function of files. You'll need to implement these functions yourself if you need them.
Regards
Jonathan.
|
|
|
|
|
This is a great control and it is what I need for my project.
The only problem I´ve found is that when you select a folder, it didn´t return the path, so I could not synchronize it with a treeview. I have added a new property that does it.
Great work and really well commented and explained. I have learnt a lot.
|
|
|
|
|
You already have all this in the control.
The ListViewItems are all specialized version:
ExplorerListViewItem <-- FolderListViewItem
<-- SpecialFolderListViewItem
<-- FileListViewItem
The FileListViewItem expose the FileInfo property which returns the corresponding file FileInfo object instance. You can access the path of the file from there.
The same for the FolderListViewItem. It expose a DirectoryInfo property.
Enjoy;)
|
|
|
|