Advertisement

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

2002C #8673
File/Directory/Drive Exists (Updated)

This code returns a true/false if a specified drive/directory/pathname exists. This is a small, fast routine.

2002C #8688
ShellExec, Wait and Check for changes for a file.

This sample program calls the Windows API to ShellExecute to a file you select. Then it opens the file with it's associated program, waits for the program to end, and identifies if the file has been changed. Rock ON!

2002C #8696
Amazing Programming Utility Browser

This is an Amazing Tool that do all that: 1- Search for *.frm and *.bas on all your drives 2- Store files info in an MSFlexGrid 3- Retreive all the Functions/Subs from all the files 4- Store Functions/Subs info in an MSFlexGrid 5- Function, Sub and File Viewer 6- Api utilization for search optimization 7- Read/Write I/O files treatment 8- Dynamic forms demonstration 9- Lot more.... !!! Thanks for using this code. Carlos : elterrorista@videotron.ca (VBMania)

2002C #8697
Explorer Program

Hey !! This is an Explorer program exacly like the one comming with with windows. it is not completed but almost everything is there Tool, Icon, Drive, etc.... A MUST SEE ... It gives you the files Info Browse you Hard Drive in a TreeView exacly like Window and chow up the files in ListView exacly again like windows... So Enjoy it !!! Thanks for using this code...PLZ Leave Comments Please visit my new web site and see what you can do VB power !!! come and chat with me http://www.virtualgamer.t2u.com

2002C #8712
Choose Directory

Via API calls, has the user choose a directory. No commondialog needed!

2002C #8729
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.

2002C #8731
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.

2002C #8733
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

2002C #8734
FindFile - Fast, using the API

Uses the FindFile, FindNextFile, and SearchPath API functions to quickly find a file on your hard drive. Runs faster than methods which use Dir$.

2002C #8743
FilesSearch

This sub/function searches your hard drive(s) or directories for file(s) like the Windows 'Find Files or Folders...'. It uses mainly the Dir() command and can be used with any programs and visual basic I have encountered. This helps uses to quickly find a file or program for their applications.

2002C #8769
Open Folders As Windows from VB5

This code is for those people who want to open up folders/directories as separate windows, as compared to the alternative fileboxes.

2002C #8783
Command1_click

Allows you to backup a source file and have the destination file name be the current date. Great for database backups!

2002C #8784
Easy routine to check/create directories

This very simple routine avoid checking if a correct path already exist before using it and, if not, create it exactly as you want. Imagine you wont to write a log file in a path defined as: C:\Myapplic\Services\logs\LOG.TXT you must check before if the directory Myapplic exist and then check all other subdirectory (Service,logs) before opening the file For Output. Probably you will use a lot of Error Resume Next, Mkdir(...), Error GoTo 0, dir(....) and so. Instead you can use this routine as described below: Myfile="C:\Myapplic\Services\logs\LOG.TXT" Call CheckDir(Myfile) nf=FreeFile() Open Myfile For Output As #nf . . . Close #nf and including the following .bas module: Public Sub CheckDir(file) Ix = 4 'Initial index KSlash = InStr(1, file, "\", 1) 'Search for first "\" For Cnt = 1 To Len(file) 'Run until discover 'other directories KSlash = InStr((KSlash + 1), file, "\", 1) If KSlash = 0 Then Exit For 'Last slash dir1 = Left(file, (KSlash - 1)) cdir1 = Mid(dir1, Ix) Ix = Ix + Len(cdir1) + 1 hh = Dir(dir1, vbDirectory) 'If Directory doesn't exist, create it If StrComp(hh, cdir1, 1) 0 Then MkDir (dir1) End If Next Cnt End Sub

2002C #8804
Recent Files accessed in a

In a Drop Menu in one of your programs, you can list the last eight files the user opened. This will allow the user to quickly access a recent file again. I literally copied a sample from the VB5.0 package and eliminated the uneeded code.

2002C #8814
Associate File Name and Icon

For those of you who want to add a touch of professionalism to your program, now you can create a file type in the Windows Registry database which will associate all files ending with your program's file extension ( yourfile.xxx) to your program. You also specify an icon for your file type and a description. This example also shows you how to use Command$ to open these files in your program when once the file is clicked or opened, and a quick tip on creating files in the Windows Recent file folder (Start > Documents).

2002C #8815
FileReader Classes

Two class modules that load any size flat file with delimiters (tab, comma, space, etc.) into memory. Once loaded, you can reference any cell that has been loaded... sort of like Excel.

2002C #8826
FastTextStream

Read large text files faster. Reads lines in text files about 30% faster then the TextStream class. Skips much faster.

2002C #8843
Blocked File IO

This code demonstrates the basics behind blocked IO. This is commonly used when copying files.

2002C #8844
clsScript

This VB Class allows you to quickly and easily read/write files, line by line, word by word.

2002C #8852
*** Destroy a file without getting error! ***

This DOES use the kill function, but when you use this it actually opens the file you want to destroy, cleans it out, then deletes it so you don't get any error because of sensitive data!

Languages
Top Categories
Global Discovery