Advertisement

Results for "Category: Files/ File Controls/ Input/ Output"

7_2009-2012 #219835
Binary Save/Open File

Saves/Opens Binary file. Takes the contents of (2)Listboxes, (1)RTB, and (1)Label and saves to a binary file. Also opens the contents of the binary file into (2)Listboxes, (1)RTB, and (1)Label.

7_2009-2012 #219913
UPDATED: NTFS Data Streams: the true way to hide information and extend your file system

11/10/2003: To celebrate my mother's birthday (to whom I shall dedicate this update to) I've decided to post a new version of the code. As posted in the recent article, all of the bugs and features that you have suggested have been implemented. Thank you very much for your comments! If you find any new bugs, please let me know! This article will teach you about a big secret of the NT File System (NTFS): Alternate Data Streams. First off, a brief history about ADS will be offered, followed by practical applications of data streams, with examples. Finally, explanations on how to protect yourself from the dangers (and what they are) of ADS. Full source code is included as well as a GUI for scanning your disk for ADS, as well as editing and viewing them (or creating new ones). As a bonus, there are two versions, one in pure API, and one using VB controls. Finally, you can integrate this app in a VBS script, with very little modification, for server maintenance.

7_2009-2012 #219914
NTFS Data Stream Update

Hi everyone, Included in the ZIP file is a new version of the NTFS Alternate Data Stream code. It fixes all the bugs listed below, and add new features. All of these have been kindly given as suggestions from everyone on the site, and I wish to thank you! If you'd like to read the original article and vote on it (if you haven't seen it already), it's located at: http://www.planetsourcecode.com/vb/default.asp?lngCId=47299&lngWId=1

7_2009-2012 #219952
Recurse thru sub directories

I haven't seen this on PSC using the filesystem object or a collection. very neat and fast since you don't need to go through it twice to redim an array. the only slow down with this code is the print statement.

7_2009-2012 #219958
FAST Tail Function for VB

After hunting for this functionality since I started using VB, I've finally figured out how to *quickly* read the last few lines in a file. This function fills a dynamic array with the last X number of lines in a file you specify. I use it to monitor apachewin32 logs on another server. This is much faster than using 'line input'. I know there may be more optimized ways of doing this, I just thought I should get it out there.

7_2009-2012 #219961
ListView 84 Subs and Functions

Just learning how to manipulate the ListView Control and thought I would pass this along. Might do more controls later on if response is good. If you find some of these useful please vote :>) Subs and Functions Check all Items in ListView UnCheck all Items in ListView Remove Checked ListView Items Remove UnChecked ListView Items Copy ListView Column Copy Entire ListView Copy Selected Column Items In ListView Copy Selected Row Items In ListView Copy Column Headers In ListView Copy Formatted ListView Copy And Format Selected Items In ListView Copy Checked ListView Column Copy Checked ListView Rows Count ListView Column Headers Count ListView SubItems Columns Count ListView Column Items As Sum Count Selected ListView Column Items As Sum Count ListView Items Count Selected Items In ListView Count Unselected Items In ListView Count Checked Items in ListView Count UnChecked Items in ListView Count Duplicate Items in ListView RemoveDuplicateItemsInListView RemoveDuplicateSubItemsInListView Remove First Item In ListView Remove Last Item in ListView Remove Selected ListView Item Or Items Remove UnSelected ListView Item Or Items Remove NonMatching Items in ListView Remove NonMatching SubItem in ListView RemoveNonExactMatchingItemsInListView Remove Matching Item in ListView Remove Matching SubItem in ListView Remove Exact Matching Item in ListView Clear ListView Remove ColumnHeaders in ListView Remove ColumnHeader in ListView Resize All ListView Columns But Item Column Resize Last Column Resize ListView Columns Equally Is Item Checked in ListView Is Item Selected In ListView Is ListView Full Color ListView Color Stripe ListView Rows BackColor Color ListView BackColor Row Color ListView Rows BackColor To Default Color Color Selected ListView Rows BackColor Color Selected ListView Rows BackColor To Default Color All ListViews On Form Select All ListView Items Deselect All ListView Items Get First Selected Item In ListView Get First Selected SubItem In ListView Get First Selected Row In ListView Get ListView Column As String Get Entire ListView Get Selected Column Items In ListView Get Selected Row Items In ListView Get Formatted ListView Get Column Headers in ListView Goto First Item in ListView Goto Last Item in ListView Goto Row Item in ListView Load Basic ListView File Save ListView as Basic ListView File Save ListView Column as File Search ListView By Column Search Entire ListView Search For Closest Match In ListView Search For Closest Match In ListView Column Find First Item Or SubItem In ListView Find Next Item Or SubItem In ListView Selected ListView Items ListIndex For User Selected ListView ListIndex Send a ListView Column to ComboBox Send Selected ListView Items From Column To ComboBox Send a ListView Column to ListBox Send Selected ListView Items From Column To ListBox Send ListView Column to TextBox Send Selected ListView Column Items To TextBox

7_2009-2012 #219993
DataGridView sort correctly

This code shows how to keep the current row position highlighted after a sort is done by a user on a DataGridView by clicking one of the column headers.

7_2009-2012 #219994
DataGridView HitTest

Shows how to get the former and current value in the current cell of a DataGridView along with customizing the current DataGridView context menu.

7_2009-2012 #219996
DataGridView Image Columns

This project demonstrates a very simple usage implementing a DataGridViewImageColumn. The project has been kept simple to allow a good learning experience. Nothing is needed outside of Visual Studio, all data needed is created via an array for the demo.

7_2009-2012 #220012
Drive Structure

Just a simple program which uses the FileSystemObject and Recursion to output a complete directory/file structure of your computer to a file. I was originally gonna use this as a sort of snooping thing a while ago, you could run it on someones computer, and then read the text file to see what they had on their computers. The text files come out quite large, but when zipped up they're usually only about 50k. Uses a good example of recursion.

7_2009-2012 #220050
Editor

Yet another word processor. Shows the basics of centering text, left/right justify, choose font, font color, cut, copy, paste, undo, select all... Keeps track of if your current file has been saved or not, basic word processor. I got bored.

7_2009-2012 #220068
Saving/Loading a listview Example

Shows how to add items to a listview and then save those items to either an INI file or to Registry. Once saved you can then load the data back into the listview.

7_2009-2012 #220078
Beginners Toolbox

Threw this together to answer a group of questions in the Discussion forum. It is intended to help those just starting VB. It demostrates string manipulation, file handling, simple navigation, reading and writing to files. It includes four example apps that include menus, window handling, file properties and a basic text editor. Code for each function appear in a textbox ready to copy into your project. I hope this is of some help to people beginning VB. Good luck.

7_2009-2012 #220079
Image Previews in Common Dialog

If you are writing an Image Editor or your app opens picture files you need this. Just like the big boys you can now show a preview of images right there in the CommonDialog window. Very easy to use. Add a module and a small form to your project and call with a single line of code.

7_2009-2012 #220081
Yet Another Better Browse for Folder

This module provides a Win2K interface to the Browse for Folder under Win95/98. This is not an update to my earlier submissions but a complete rewrite using pure API. With Win2K MS introduced a new DLL (SHELL32.DLL Version 5.0) which includes a better Edit box, Popup menu and a New Folder button. With this module you can achieve the same result (except the Popup menu) using the old DLL (SHELL32.DLL Version 4.71) as used by Win 95/98. Additionally you can add a checkbox, customise captions for Titlebar, OK button, Cancel button, New Folder button. You can also resize the Browse for folder window. Additionally you can choose to open the dialog double size or full screen. All the usual features are present, such as include files, start at special folders etc. You can select between the old style Editbox or the Win2K style editbox (Much better I think.) Why bother? - Not everyone is running Win2K. Very easy to call. Heavily commented and includes complete sample usage. Please vote if you find this useful.

7_2009-2012 #220082
CommonDialog and Browse for Folders Plus

Browse for Folders Dialog with 'Create New Folder' button and 'Include Subfolders' checkbox. CommonDialog with image previews. Both these controls are updated versions of functionality included in some of my previous submissions. Now Win 2K compliant. Please vote if you like it.

7_2009-2012 #220083
Load in Previous Instance

Another example for Beginners from MrBobo. This example program shows how to communicate between instances of your application. Lets say your application is assosiated to a filetype. The user clicks on such a file and an instance of your application is launched. But what if you want to load the file in the existing instance - not the new one ? There are many examples of how to achieve similar results on PSC. This method is designed for reliability and ease of use with a minimum of code to implement.

7_2009-2012 #220084
Extension Changer

More examples for Beginners by MrBobo. This little demo demostrates the use of Drive boxes, Dir boxes and Filelistboxes. To give the example some purpose it allows you to safely bulk change the extensions of files in a selected directory. To do this safely you need to quickly parse filepaths and include error handling to avoid overwriting. The demo includes an example of a 'Desktop' and 'Up one level' button in its' browse function, get special folders, enumerating all filetypes from the registry and a simple auto-complete function for comboboxes. Includes an interesting function - Safesave - which appends a number to a filename if the file is found to already exist.

7_2009-2012 #220086
CommonDialog with Recent File Tab

Adds a touch of professionalism to your project. Just like VB IDE. One tab has the common dialog, the other tab shows recent files, their path and their icon in a listview. Can obviously be adapted to show images, provide different settings and options to the user as to how they wish to open a file. Included : Standard EXE project, UserControl Project and test project, OCX Project and a test project for the OCX. Demonstrates saving/loading listview to registry, getting file icons for use in a listview, how to build your own commondialog controls, controlling other apps windows.

7_2009-2012 #220116
VBSINI2

With this ocx you can access INI Files from vbScript, VisualBasic, ASP (maybe). Read, Write Keys, Read all KeyNames of Sections, Read all Sections of an INI file. Delete a Key, Delete Section ..... The Readme.htm shows how it works. This Upload has now also include a Demo for Visaul Basic and vbScript. Also included is the code for the OCX, it's written with VB6 and it's a good demo for the how to create an ocx file. Please vote for this code

Languages
Top Categories
Global Discovery