Results for "Category: Files/ File Controls/ Input/ Output"
Why mess around with the printer object if you don't have to? In my example, I print the contents of a richtextbox control to the printer with only a couple of lines of code. PERFECTLY formatted. Readily applies to just about any control or string, though.
This shows how to get the files attributes or set the attribute for the file
This VERY Simple 5 Line Code Writes To a INI File! Enjoy!
Yet another word processor. Shows the basics of centering text, left/right justify, choose font, font color, cut, copy, paste, undo, select all... Keeps track of if your current file has been saved or not, basic word processor. I got bored.
.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
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.
Allows you to reset the Created/Last Modified/Last Accessed date/time stamp on a single file, multiple files or all files in a specified directory. Works on all file types with all file attributes (normal, read-only, archive, system, hidden). Useful for setting uniform date/time stamps for a project deployment.
This one saves/reads some small headers in biary format to a file, e.g. to save some extra-data to an executable (such as almost any server-builder works!)
Adds a touch of professionalism to your project. Just like VB IDE. One tab has the common dialog, the other tab shows recent files, their path and their icon in a listview. Can obviously be adapted to show images, provide different settings and options to the user as to how they wish to open a file. Included : Standard EXE project, UserControl Project and test project, OCX Project and a test project for the OCX. Demonstrates saving/loading listview to registry, getting file icons for use in a listview, how to build your own commondialog controls, controlling other apps windows.
This searches a givin directory for .jpg .bmp .gif and can be edited to search for other picture formats as well. It then lists all pictures found in a listbox. Click the checkbox to preview each picture 1 at a time in Microsoft Internet Control(Web Control). Please Vote! underground technologies u_tech@excite.com
It will create a tree of directories even though your PC doesn't have the parant directory. For example if you want to create a directory "Test3" under C:\TEST1\TEST2. This function will create TEST3 and it will also create TEST1 and TEST2 if your system doesn't have TEST1 and TEST2. Please Vote ;)
Rev 8-1-2001. Have you ever had to compare files in two different folders? Mostlikely, you used paper and pencil. This VB snippet shows the contents of 2 folders and flags files with different date or file size. My graphic design is not the best and yes it would be nice to navigate to you folder (now you enter path). For the first step (3+2 hrs work), I think it will do.
This is a fairly simple code that is an alternative to Windows Explorer or My Computer. An example using the DriveListBox, DirListBox and FileListBox, this code was "inspired" by File Browser, uploaded a few days ago. However, I wrote every line of code in it except for the "Error" section, you'll see when you download it. This application distances itself from most, maybe all of the other file browsers on PSC because it enables you to OPEN files from right within the application, by using the Shell ("Start ") API call. This enables you to open all types of files that are associated with an application, not just open specific files. This function does not ALWAYS work, I don't have a clue why not, but if anyone could point out why this is happening, if they could post an UNDERSTANDABLE comment, it would be greatly appreciated. Now, if you think this code is worthy, throw a few positive comments amd votes my way, and bear in mind, I'm 11 and this is in the BEGINNER category. Some of you seem to derive some strange pleaseure from rating beginner code at the intermediate, or even advanced level. I hope this Drive Browser comes in handy or teaches you something!
!!!Please Leave Comments!!! This Prog is a painting program able to draw lines, free-hand, point to point to point, circles, rectangles, triangles, erase free-hand, selected areas, saves and loads pics, floodfill objects, create custom colors, save colors.
Very fast recursive function to calculate the size of a directory (folder). This code is simple and built for speed. This code does NOT use the FileSystemObject because it is NOT installed on all PCs, therefore you cannot write code using it (unless you include the scrrun.dll - Microsoft Scripting Runtime with your application). **Update - I added the search options for System, Hidden, and Read-Only files so the result will truely match the same number of bytes that is displayed in Windows Explorer properties.
Does anything you want to files in a directory and its subdirectories. For example, if you would like to add MP3's in a directory to a playlist in your MP3 player program, this would be handy for adding all of the files including those residing in subdirectories of that directory.
The codes included in zip file. Vote if you learn something,please.
Have you ever needed to read a fixed length text file in Visual Basic? I have written quite a lot of applications where I will receive a fixed length text file from the mainframe. Tired of using the Left$, Right$ and Mid$ functions to parse each line for the individual elements of the line? Then read on. Oh, and thanks to Rockford Lhotka's, book on Visual Basic 6 Business Objects for giving me this idea.
Checks to see if a file exists.
You create a funtion that can open a file with just one line of code.