Results for "Category: Files/ File Controls/ Input/ Output"
Might not be very fitting for complexe ini manipulation, but this is the simplest and easy to use code i've found. Great for the newbie i am myself. It's not my code, and i don't know who it comes from, but i thought i'd share it. Included is a VERY easy to understand sample project ! Cheers, and enjoy :)
These different ways of using the shell command will let you : Launch files without knowing the associated program(doc,bmp,zip,etc), copy files and complete directories, run dos commands, launch a browser, launch an email client with almost all fields prefilled(including body!) and loads of stuff you might think of.
This code is VERY usefull! It can load a files contents into a Rich Text Box and also save the contents!
i'd imagine this has been done before, but if it has i haven't seen it. all it is is a substitute for the FileCopy statement. copies a file byte-for-byte to a new destination. 110% commented just like 'A+ Secure Delete' And 'A "Dummy" File Generator' (both by me). well hope you like this.
This is just a single Bas file with two functons for binary read and write of files. The functions are using API's for a better performance.
Appends invisible text to files using non-printing characters. This amounts to fairly good encryption only visible in a hex editor. Some subclassing is used so pushing the end button from the VB IDE will crash it. Updated 12-17-2002. Now uses RTF.
For those that like to create objects on the fly and avoid extra controls, this shell interface module provides easy access to the BrowseForFolder dialog with drop down list support for constants and all system folders. It even creates them with their corresponding desktop.ini file and proper icon if not present already. Windows handles the NewFolder errors and error handling is included to rule out invalid paths.
A collection of file associated functions such as GetLongFilename(), GetShortFilename(), GetFilePath(), GetFileTitle(), Exists(), etc.
Excellent functions for saving(SetInitEntry) and retrieving(GetInitEntry) data in ini files. Includes routines for a RecentFile menu (GetRecentFiles, AddRecentFile, RemoveRecentFile) which automatically fill and update your menu.
File Manager - I've seen no file manager's like this one. This is a popular format for a lot of programs. All Folders, Files, etc are in a Listbox. When I couldn't find any source code to do this.. I made it myself. Please let me know how you like it.
This code is a very quick way of getting data from a file.
Jpeg Comment. This is a demo how to read/write Comments into a JPEG file. The ReadJpgComment - function is written after rdjpgcom.c of Independent JPEG Group. WriteJPEGComment is written after some Delphi source.
Opens a INI-file and Get the value of ex: "Screensaver=" without using any system calls!!!
Easily lets you add a link from you VB application or open default email program.
This example builds on Srinis example found on www.vb-helper.com. Srinis example loaded data to a treeview from a text file with tabs denoting indentation. My contribution is the save treeview to file function. It only saves one level of childs, it was all I needed for my other project. Srinis example loads more than one level of childs. I am shure some small modifications to my example will enable it to save multiple levels of childs, but thats your jobb ;)
Sorry last entry had no .BAS FILE, SORRY FOLKS... It demonstrates how to use the drag & drop methods. It also shows you how to dynamically add controls in run time and how to move controls around. The prog lets you create controls and have them snap to a grid.
This code is based on the Windows 95, Windows 98, and Windows 98 Second Edition glitch in file viewing. Be very careful with this tool for if you lock the folder that contains the program, the program will not run. For example if this program is in your C:\Program Files\Lock\ folder and you lock Program Files the program will not run. There a few safety features. First you need to create a shortcut to the EXE (when you compile it or just rem the line in the frmLoad Form_Load section that checks for the Command$). Create a shortcut to the EXE and give it a command line of shortcut. (If you edit the properties of the shortcut file and find the location of the program. at the end of that add "shortcut" without quotes). Next your mouse needs to be in the upper left hand corner of the screen at co-ordinates 0,0. I would suggest giving the shortcut a "hot key" or using the keyboard to open it. Without the command line "shortcut" and the mouse being in the upper left hand corner of the screen the password box will not appear. Now the initial password (default) is "maxx" without the quotes. Once in the program you can change the password. You can always delete the string from the registry and the password will default back to maxx. The file/folder locking feature is due to windows 98se and belows glitch. DOS can read characters windows can not. So by going in dos and using an ALT code to rename a file/folder it will rename it. However windows will not be able to read the alt code and will give the file/folder an underscore. You will not be able to open/explore or delete the locked folder/file. In my program I use the alt code of alt+0254 or chr$(254). If for some reason you mess up a file or folder and the program can not rename it or if you locked the program itself you can manually fix it. Either load a dos prompt or restart in dos. The command used to rename files in DOS is REN or RENAME. The format for ren or rename is the same and goes as follows. REN (Source Path and File Name) (New File Name) for example: REN C:\Clever.txt Smart.txt this will rename the file Clever to Smart. To get rid of the lock you will need to use alt plus the number-pad. Lets say clever was locked. You would need to do this REN C:\Clever(hold alt and press 0254).txt Clever.txt When you hold alt and press 0254 it will insert a box, that is the alt code. When you hit enter the file/folder should be renamed and everything should be okay.
This code enhances input validation in real time instead of waiting for the user to press a button(Ok or Submit or whatever...). With this code you can limit the user input to whatever type you want(Whole Number, Fractional Number, Uppercase...).This also provides a way to optionally notify a user when an input error is being made while typing or pasting. Besides that, other features that are not available in VBs wrapper are exposed to developers. Discover for yourselves through your object browser. This class can also be attached to controls that have an Edit box constituent(like Comboboxes and Grids). Please vote for this code if you find it useful. And please comment.
allows viewing and changing of file and folder attributes batch or one at a time. contains warning msg boxes where nessary
This is a small program that I use to pak text file into one big one. It does not add an compression to the file just paks them in to one I hope to add some compression into it soon or when I can find some infor on how to do that. Any way I have also included a Winzip like Self extracter that you can build the pak file in to exe and run them on any computer. as long as vb runtimes are installed anyway Hope you lile the code.