Advertisement

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

5_2007-2008 #172176
Validate_Drive

Validates whether a given hard/floppy/network drive is valid

5_2007-2008 #172177
Validate_File

Determines if a file exists Improved version--detects hidden files too!

5_2007-2008 #172217
cmdFormatDrive

Format Floppy Disk using API:Here is the code on How to Format Floppy Disk using API. Note -- This code can format your Hard Disk as well, so you should be careful!!!!

5_2007-2008 #172221
Launch file and associated program

How do I launch a file in its associated program? The Shell statement unfortunately only supports launching an EXE file directly. If you want to be able to launch, i.e. Microsoft Word by calling a .DOC file only, you can make your VB application launch the associated program with the document using the following method:

5_2007-2008 #172225
Converting long file names

VB4's commands for dealing with file names (such as KILL, MKDIR, and FILECOPY) support long file names without programmer interaction. A number of the Win95 API functions will return only the short name, and you'll notice a number of short file name entries if you're digging through the registration database. Therefore, occasionally you'll need to convert a short file name into a long file name. This function lets you pass a long file name with no ill effects. The file must exist for the conversion to succeed. Because this routine uses Dir$ and "walks" the path name to do its work, it will not impress you with its speed:

5_2007-2008 #172234
16 and 32 bit functions to create

16 AND 32 bit functions to read/write ini files--very useful!

5_2007-2008 #172255
.INI read/write routines

.INI read/write routines mfncGetFromIni-- Reads from an *.INI file strFileName (full path & file name) mfncWriteIni--Writes to an *.INI file called strFileName (full path & file name) [email protected]

5_2007-2008 #172260
cIniFile

Complete access to INI files through a simple class module, which works with VB4 16,32 and VB5. This class module allows you to read/write INI values, delete values, delete sections and query whole sections through a simple inteface.

5_2007-2008 #172273
Win95DirectoryPrompt

Prompting the User for a Directory in Win95. Windows' common dialogs are great if you want the user to select a file, but what if you want them to select a directory? Call the following function, which relies on Win32's new SHBrowseForFolder function:

5_2007-2008 #172286
How to open a file with one line of code!

You create a funtion that can open a file with just one line of code.

5_2007-2008 #172287
File/Directory/Drive Exists (Updated)

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

5_2007-2008 #172288
GetShortFileName

A short pathname of the passed string containing a long pathname. 'For example it turns "C:\Windows\MY Long Path Name\My Long Name File.txt" into "c:\windows\mylong~1\mylong~1.txt" (The actual resulting pathname is determined by the short names that windows assigns to all files and directories). 'This is useful when you need to create a fail proof pathname (assuming the file exists and is accesible).

5_2007-2008 #172301
Raw Disk Access

RDA makes direct, low-level, byte-precise reads and writes to mass-storage devices easy. No need to have to deal with DOS interrupt calls or any such nonsense - RDA takes care of all the behind-the-scenes work for you. RDA also handles the variations in access methods needed by different Windows versions. RDA can read from or write to any specific sector on a logical drive. And if that's not easy enough, there's even a nonvisual frontend component that makes RDA appallingly easy to use - pick drive/first sector/how many sectors to read, call one procedure to perform the actual read, read data from a property. RDA is based on and inspired by a Delphi unit file called VWIN32, written by Geir Wikran, and incorporates portions of VWIN32 directly. As such, RDA is released under the same licensing terms as VWIN32 - free for personal or commercial use as long as the source itself is never sold or misrepresented. PLEASE NOTE: The RDA distribution includes a demo application which requires the TMPHexEditor/TMPHexEditorEx components package by Markus Stephany. This package is available from http://www.mirkes.de/en/delphi/vcls/hexedit.php.

5_2007-2008 #172304
RmDir

This Procedure Deletes all Files in Directory as well as all Sub Directories and Files

5_2007-2008 #172307
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!

5_2007-2008 #172313
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$.

5_2007-2008 #172324
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.

5_2007-2008 #172350
File Loading Methods Compared

This example compares four file loading methods, (the normal VB Open method, the ReadFile API, and other methods involving MemCopy API), you will also see the difference between returning a String or a Byte Array. I did this example because I keep seeing people using the normal VB Open command to load files, even for Hex editors, as you will see there's a huge difference between using it and using an API. The test in the screen shot was made with a 1GHZ P3 Notebook with 384MB RAM (as a compiled .EXE), please note that times may vary from test to test depending on what your computer's doing, etc. Comments and/or improvements as well as votes are welcome.

5_2007-2008 #172373
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.

5_2007-2008 #172389
Command1_click

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

Languages
Top Categories
Global Discovery