list view files in .NET - vb.net

Can anybody tell how to list view opened files in VB.NET.
The opened files should be seen in list view at the left part of GUI.

You can manually track open files, for example, by keeping a collection that contains their names. Once a new file is open, a new item containing the file path is added to the collection. When a specific file is closed, that item is removed from the collection.
Note: The collection I am talking about can have different data for specific files, not only file paths.
Given you have that collection, you can easily bind it to a ListView control.

Related

File Properties tab access information vb.net

I was currious to how I can access the information cpntained within a files propertie tab (ussualy accessed by right clicking on a file) and display that information within my vb.net application?
Some of them can be found in the FileInfo class.
CreationTime : Gets or sets the creation time of the current file or directory. (Inherited from FileSystemInfo.)
Length : Gets the size, in bytes, of the current file.
...

Trying to extract data from mdb file upon selecting the file in a listbox

I am generating a new project from an existing template every time i click on create and renaming the same as a new project name (an mdb file)in the same directory. The details mentioned in to the right namely location, engineer, contractor etc are stored in this mdb file at this instance.- so far i am successful....
Now that i have the list of projects listed in my list box I would like to select any one and I wish to see the details for the same to my right.
I've posted a link having a .bmp image of the form. Help is highly appreciated.

File attachment from HTML form doesn't get replaced on Domino server

I have a Domino database that stores documents with file attachments. The file attachments are stored in the Body RichTextItem as attachments.
For managing these documents I have an HTML form containing a file upload field.
Now, when I upload a file whose name differs from the current file in the document, everything works fine, and the uploaded attachment replaces the previous attachment.
The problem is when I upload a file that has the same name as the already existing file. In the WebQuerySave property of the form I call a LotusScript agent that should replace the old attachment with the one from the HTML form.
But in this agent I see two items called $FILE that have the same FileName. When I access them, I cannot distinguish these two items. I tried:
document.GetAttachment(filename) – obviously doesn't work, since the names are the same => I can only access the first attachment.
ForAll item in document.Items – I visit two items having the name $FILE, but both items are the same: the modification time is the same, the filesize is the same.
I could get all the attachments and remove all of them but the last. But is there any guarantee that the last item is the one from the HTML form? Or I could first extract the modification time from all the attachments and remember the newest. That must be the attachment from the HTML form.
Or is there a simpler solution?
For reasons like this behavior and several others, I have built most of the basic web facing Domino applications to store attachments on linked documents instead of the primary document. That way they can be accessed easily and do not get updated or modified except when they are supposed to be.

Sharepoint 2010 folder level views on document library

I have a document library in SharePoint 2010 and want to create different views on the basis of attribute values like
View1 shows only those folder which have Close projects
View2 shows only those folder which have Active projects
so I want to create folder level column which can be set as close/active.
Any Idea to solve ?
you can use content types for this. You just need to create content types and setting the parent content type group as Folder Content Types and setting the parent content type to Folder. Once done you can create a new site column and use it later on your list's folder.
A more detailed step by step instruction can be found here.

How do I put a listing of files into a menu?

I have a folder with .txt files in it. How can i make my menuitem get those .txt files and put the filenames in the menuitem, so that it creates a list of all .txt files in that folder.
So when i put a .txt in the folder the program automatically creates the menu item.
Does someone knows how to do this, or perhaps an example?
Unless you're using ASP.Net, you're looking for the FileSystemWatcher and Directory classes.
Basically, you need to call Directory.GetFiles and loop through the results creating MenuItems.
Then, handle the FileSystemWatcher events and either rebuild the menu from scratch (simpler) or update the appropriate item (faster)