Advertisement

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

C_Volume2 #73101
Find and Replace Text in a File

Replaces text in a file with different text. Form has two three text boxes: Search String Box, Replace String Box, File to Search Box. The file will be searchd for the search string and if found the file will be updated with the changes. (Note the entire file will be re-written)

C_Volume2 #73119
Sending Raw Data to the Printer Port in VB

Have you ever tried to send raw data to a printer port (LPT1 for example) using Visual Basic without using VB's printer object or an outside DLL or API? If you have then you know that it is virtually impossible because Visual Basic cannot directly access any system devices. This very simple code demonstrates how to use an undocumented feature of VB's 'OPEN' statement to allow direct access to the printer port as if it were a file. Accessing system devices as if they were a file is a method that was built into the old DOS-based versions of Basic, but until now I was unaware that this functionality still exists in Visual Basic. This method even works in Windows 2000, which is supposed to block direct port access for security purposes.

C_Volume2 #73123
Serial Com User Control

This is an event driven VB user control to handle serial COM communications. Instead of using the default ocx you can now compile this user control with your code and you don't need to supply any extra ocx's or third party dll's to support serial comm's.

C_Volume2 #73126
Read / Load contents of a textfile into a listbox

Reads / Loads contents of a textfile into a listbox

C_Volume2 #73128
Save / Write contents of a listbox to a textfile

Save /Write contents of a listbox to a textfile

C_Volume2 #73137
Copy files in directory - Extremely simple!!

With this code you can copy all files within a directory with a particular extension to another directory. Actually it will give you a progressive listing of a file with a wildcard and then you can do whatever you want with the file. Extremely simple and straightforward. I dont understand why the other codes are so huge. If you find an error or if you would like to comment please leave a messge.

C_Volume2 #73185
file association within a program (Flash Player Example))

This little number will help you understand the idea of having a file association like notepad, wordpad or any other program that if you click the data file it will launch the program and open the file. This one will play macromedia flash files, plus also has an auto resizer so that you can grow and shrink the window, and the information inside will do so as well.

C_Volume2 #73189
Relative Path Function <BR><SMALL>Gets the relative path of a file w.r.t. a directory</SMALL>

A reusable function that computes the relative path of a file with respect to a given directory Examples will make the point clear, so here goes: GetRelativePath ("C:\VB\", "C:\VB\File.ext") returns "File.ext" GetRelativePath ("C:\VB\", "C:\VB\Program\File.ext") returns "Program\File.ext" GetRelativePath ("C:\VB\", "C:\File.ext") returns "..\File.ext" It is useful to insert images and hyperlinks into webpages, given the filenames of the images and the HTML file.

C_Volume2 #73224
Download manager

This code will tell you how long it will take to download a file just put in the Size and speed it will do the rest

C_Volume2 #73236
A TRUE Windows Prompt Like Dos (no controls)

Haven't seen it done yet until I did it myself. I asked around if there was code to create a 'prompt' and all I seen was modifed multi-line boxes. This is not a Dos window, its a windows window. - this is as real as it gets... If you need a GUI windows command prompt... here it is, Best WINDOWS command line code here... Please: I am going to use this code for a Business Basic interpreter, if you find any bugs or make it better, please let me know!!! I am always looking for improvement here!! Code is FREE for all...

C_Volume2 #73303
New type of INI

A different kind of INI because I don't like the ini's that are so easy to use! example: @ Header1, Value1 @ Header2, Value2 @ Header3, Value3 @ Header4, Value4

C_Volume2 #73329
RecurseFolderList

This code is a modified version of ShowFolderList by Bruce Lindsay. (Thanx !!) This code will recursively parse a directory defined by an path parameter. My aim was to work around the non-recursive nature of the dir function. Bruce's original code does that to one folder/child level. Mine now returns everything below a given path. You can still use getattr to define Folder or File attributes.

C_Volume2 #73331
cFindFile - A Windows API wrapper for FindNext

This is a wrapper class for the FindNext functions. The FindNext, and related functions, allow the searching of a drive for a given file. Wild cards are supported as are UNC and long file names. It returns a string array, to n-tier enable it. It was also designed for reusability at the source code level. It is currently used by a number (5+) of production applications (in it's current form). For more details and a usage example, please see the Declarations section of the class.

C_Volume2 #73335
Bit IO

This module allows you to view a file as a collection of bits rather than as a collection of bytes. It allows you to read/write a single bit at a time or read/write up to 32 bits at once.

C_Volume2 #73369
Active Self-Extract

With this code, you can incorporate self-extract functions to your VB program. You can actually add a compressed file, with you own custom compression algorithm to a EXE, so you can extract it just by running your program (just like WinZip's SFX modules), you can save your application's setting in it's executable(so you don't use the registry, or INI files), you can even put the registration information inside the exe(for safety), so you don't use external text files, or just put a DOC file inside an exe so a user can see it's contens even if it doesn't have Microsoft Word. This are only examples, but the posibilities are UNLIMITED. You can implement this to your program just by adding 2 functions, and calling them. By the way, it should work with almost any VB version. Included is a sample app, that shows a sample Self-Extract maker (which can include any file in the Self-Extract module, which is a VB app), and a Self-Extracting module, and of course, source code. Enjoy! P.S. If you include a zip into the Self-Extract module, some uncompressing programs will think it's a SFX, and you can decompress the files with them! (tested with WinRAR -- will say that the zip has a bad header, but will decompress the files!)

C_Volume2 #73377
PathExists%

Determine if a directory exists. It is a variation of the Planet-Source-Code function I borrowed called 'FileExists that always works'.

C_Volume2 #73385
Comma De-Limited

This code will read a file line by line and create a comma delimited text file which can then be imported into Excel.

C_Volume2 #73386
Using the Browse Folder Dialog Box

You may have noticed that in Windows the Browse Folder dialog is used in may programs, even the shell if you have used the find program you can choose browse and the folder below appears.WITH NO NEED FOR MODULES!!! You can implement this dialog bow into your applications very easily by using the following API calls. SHBrowseForFolder SHGetPathFromIDList lstrcat

C_Volume2 #73452
[- FragIt -] It means it!

This is a MUST HAVE program. It does what it sounds. It splits a file into several fragment files of a given size. It also can merge those fragment files in the original file without loosing any data. COOL! isn't it??!

C_Volume2 #73483
[ FragIt v1.1 ]- It is now more enhanced and, safe and more reliable in both spliting and merging.

FragIt is now more enhanced and more reliable. Including safe data handling and in this release the fraging (splitting) limit is broken, means you can now break a file into unlimited fragments. You can control the fragment file number with the fragment size only and nothing else. Don't lose focus on the new on-the-fly canceling option. Now for the unlimited fraging capability you might end up fraging your 2MB file into 2097152 fragments and it really takes a while. When you hit the Initialize button it changes into cancel button. So using this new cancel option you can cancel both split and merge actions on-the-fly and there is no data lose! Cool Hah? It would be nice if you VOTE for me. There is a lot of hard work involved in this project.

Languages
Top Categories
Global Discovery