Results for "Category: Files/ File Controls/ Input/ Output"
This 1 line of code will Open any file with their correct default program. EX: opens .Doc file with winword and .Zip file with WinZip..Or any file with their default program..
A small module to set the status message on PJL printers (HP's etc).
Author: BEN GRAY Email: cbsg@interact.net.au This tutorial demonstrates how to use Rich Text Box control, and mostly, how to use the Common Dialog control. It covers all concepts of the common dialog control, including flags. Now you can turn off that annoying "Open as read only" check box. It is commented heaps on every line. Special Thanx to: Ian Ippolito, Webmaster Planet Source Code www.planet-source-code.com
I made this code because I need to copy an access database with the file open (in use). But, visual basic FileCopy method and windows apis for this pourpose fails in this case with the "File Access Error". So, I made this function that copy the file in blocks. You can alter the block size so the copy can be faster or slower. Well, thats it. I hope that this code can be useful to anyone! Ah, the error handle was generated with Ax-Tools CodeSmart 2001, an excelent Add-In for any visual basic programmer! Recommended! :) www.axtools.com
NEW VERSION AT http://www.planet-source-code.com/xq/ASP/txtCodeId.23669/lngWId.1/qx/vb/scripts/ShowCode.htm With one simple procedure call you can create multiple HTML files based on any recordset and a HTX like template. It is possible to create multiple (nested) grouping levels. It is also possib to create your own constant parameters. The screenshot below and the demo project will show you some of the possibilities of this code. The code is well commented and not to massive to go through. It uses the underappreciated Split function a lot. Because of the Split function the code is very small and fast. This code can be useful: When you are not able to access your database dynamically from your web server. You can use this to publish database information. When you need an easy to use and customizable data reporting tool. When the number of data updates is much lower than the web traffic you have. In this case static WebPages will probably give a much smaller server load. If you created your own web server in VB. You can use this to give it functionality to access a database When ...?
The PrinterSupport.dll was created in order to simplify printing documents. Included features are; 1. Paragraphs 2. Rectangles 3. Circles 4. Pictures (picture object reference) 5. format text (i.e. bold, size, etc) 6. Justification (full, left, right and centre) The printing is done using millimeters so that replicating documents for programs is relatively straight forward. The non-printable area of the printer is also taken care of. Note: The printer orientation is not modified at all but can easily be added if need be. There is also no current method of selecting a printer which can also be added to the dll if required.
This demonstrates some use of the common dialog and richttext box control. It is simple and i thoguht it wouldnt require comments. Enjoy!
This project shows how you can write values to an exe file (and change it). NO API and highly commented. First, make the test_exe.exe. Then start read_write project, change values and click Write. You'll se that test_exe.exe has changed!!! Please vote and leave comments.
Nice 3D Label Control
Acess files and execute them if you like than please vote......
Allows you to adress and write an MS Access report directly into an email message. (saves attaching pesky rtf files making it easier for the reader. The code attached is what we use on a weekly basis and can be used as a template with your tables/queries
I wrote this prgram to augment MRTG (Multi Router Traffic Grapher). Each night i generate new configuration files for all my routers, when that finishes this program combines all the files into one primary configuration file. Please Vote if you like it! :)
Find and replace text strings in multiple files within a directory. This allows for wilcards. Please Vote if you like it! :)
This application update your application with a FTP site, (like Norton). The application compare the local and FTP date of the files and update only if FTP was more recent. No component, no OCX, just API You must See !!
I use these two classes to encapsulate a whole host of file oriented API calls... allowing me treat files as objects in my code and with the speed that is gained by going through the API. The clsFile class wraps around a single file, and exposes a whole host of properties of a file (and the volume it is on) including: 16 bit equivalent path, parsed filename, size, attributes (readonly, system, archive, etc), dates (created, accessed, and modified) and volume properties: label, serial no., is a cdrom, fixed disk, remote, network path, unc info, etc. (see the screen shot for the full list). Besides being a read only property class, I have modified the .Attributes enum and the .DateLastModified properties to allow changes... so that when you change the properties on the class, the corresponding properties on the file are modified. Eventually, this class could also be modified to extend functions such as Rename, Delete, Copy and Move that would work through the Windows Shell. I have the code to do this, but never bothered patching it in since in my coding, I never ran into the situation where I needed to do these actions with the file object by itself. The colFiles class acts as a collection for the clsFile class. In addition to the methods you would expect from a collection, this class also encapsulates the API functions for file searching (including recursive directory searches). If you EVER intend to use a file search in your applications, going through the API is the ONLY way to achieve this in my opinion. You'll find many examples that try to use directory list boxes to perform file scans, but these examples will be painfully slow. The API, on the other hand, is extremely fast. As fast as the built in Find/Search screen in Windows Explorer. Plus... you are able to search through paths other than your mapped drives. This covers the entire Windows Explorer directory tree (network drives, namespace extensions, etc). Don't judge this class by the screen shots before knowing that in the screen shot example, I was searching across my network which consists of a slow 10Mb hub. You'll have to try it for yourself on your set up to see why I swear by these two classes when performing seek and file property operations. For updates to this or other cool vb code or controls, check my web page: http://members.tripod.com/thefrogprince/ If you are not currently involved in the coding contest, I WOULD REALLY APPRECIATE YOU VOTING FOR MY CODE. Will only take a minute or two to make an account, and while it won't make me any money... =) it will encourage me to keep posting good quality code and controls like this one. (check out my other posts too). =)
If you have ever needed to have your program start at the same time as windows starts without putting the program into the start up menu but have been unable to figure out how to do it then just follow the following text.
-v-(updated)-v- I have added a few other needed files that a few submissions have asked for, I will probably put out a better version without any bugs as soon as it is fully tested. Thank you for your input for those that have checked out my code and thank you for voting. For those that have seen the code, it is quite unique, eh? This code will search through your computer for the specified files you type, and will list any files (with paths) as they appear. If coded properly you can use this code to make some type of shell program for later use, or....well....use your imagination. Since i have not seen this posted yet, nor have i ever seen anyone actually do it, i decided to make this my first post. If you like it, use it, But please give me credit by putting me in your greets or something. Or if you make a program i would love to see how this code enhanced it in any way. Thank you
A different kind of INI because I don't like the ini's that are so easy to use!
This code will save values for TextBox, CheckBox, ListBox, ComboBox, OptionButton, and MultiLine TextBoxes with no problem. It demonstrates using the controls collection to go through all controls contained on a form and save their values. It also has an error handler that gives abort, Retry and ignore options on errors. It uses conditional compilation to help with debugging by printing values to the debug window. This behavior can be changed by changing #const debugmode to 0. The file will automatically be saved in the same directory as your application and will contain the forms name with an extenstion of .set.
Extracts all dependency information (.dll's and .ocx's) from an executable, and returns the information in a listbox. Also has the option of saving the information to a comma-delimited file.