Results for "Category: Files/ File Controls/ Input/ Output"
.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) sitush@aol.com
Validates whether a given hard/floppy/network drive is valid
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!!!!
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:
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:
16 AND 32 bit functions to read/write ini files--very useful!
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.
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:
You create a funtion that can open a file with just one line of code.
This code returns a true/false if a specified drive/directory/pathname exists. This is a small, fast routine.
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!
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)
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
Via API calls, has the user choose a directory. No commondialog needed!
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.
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.
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
Uses the FindFile, FindNextFile, and SearchPath API functions to quickly find a file on your hard drive. Runs faster than methods which use Dir$.
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.
This code is for those people who want to open up folders/directories as separate windows, as compared to the alternative fileboxes.