Advertisement

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

2002ASP #2427
Telemtry Control

This program controls a remote unit across a range. The OFF button sends a "FF" and expects an "FF" within 1/3 of a second otherwise it times out. The reason I uploaded this is because I could not find a serial program that worked using MSCOMM and ONCOM event. I did have trouble at first until I read that Microsoft has Rthreshold default as '0'-- it needs to be '1' for the received data event to be captured I realise this is a very simple program, but it WORKS. To check this out place a wire/short between pins 2 and 3 on your DB9 serial port. This will route TX to RX on the same port. I limited it to COM1 and Com2 but others can be added. I hope this helps someone trying to use the serial port.

2002ASP #2428
Bytecompare files (fastest way)

This code compares 2 files (EXE, BMP or whatever) using the fastest possible way in VB, only asm is faster. its about 1MB/sec. If you have problems opening the project in VB5 just remove : Retained=0 ThreadPerObject=0 MaxNumberOfThreads=1 from the projekt1.vbp using notepad (or just create a new project and add the form and the module) greets, Tom

2002ASP #2452
Reading Command Parameters

Have you ever wanted to click a file and open it? If your program is associated with a specified file type, or you select file(s) and drag them onto the exe icon of your app then this code is for you. It reads the parameters when the form is loaded using by getting the "Command". This code can get each file dragged or clicked on. If you just use the command statement you will get something like this "c:\george.bmp c:\ben.bmp f:\mydoc.doc". This code seperates each file and uses another sub to open it.

2002ASP #2460
Advanced Directory Size Checker

I needed to know the size of a directory and its subdirectories (including files). Then I wanted to be able to also exclude some of the file(s) in that directory from the total directory size. So, I wrote this dll in C. You can however use it in VB as well for ease of use. Very Handy !

2002ASP #2485
Copy a Folder

Copy a Folder in another Folder. If the Folder not exists then this program will create the Folder.

2002ASP #2487
Get Serialnumber from a harddisk

Get the Serialnumber from your harddisk, cd rom or your disks.

2002ASP #2488
INI Manipulation (fixed and updated)

This project shows/explains all routines needed to manipulate sections/keys/values within an ini file. It has an intuitive interface, allowing to drag keys between sections, create/delete sections/keys/values, etc, but the routines can also be used individually with other projects. A must have to whom works with INI Files.

2002ASP #2509
Read a textfile via api calls (v1.1)

This code is designed for reading text files. i have written this code because i did not want to use the slow "open for input..." and "freefile" bla bla code... I know i coul do this via the richedit control, but i wanted to know how to do it via api, and maybe you to... This code is using the "CreateFile" Api, which must be called differently in windows 2000. Therefore, i added a "IsWin2000" function to check for windows 2000. Update: Now added a class which wraps the module, lot's of events and functionality. it's 50ms slower in read (with my test file) Class module includes also function ReadCharacters which reads the specified ammount of characters from the open file.

2002ASP #2513
Make Wave

Listen to your exes! Write your own wav-files. This program turns any file to a wav.*-file. Learn the wav-header. Feedback please!

2002ASP #2531
Manually INI (NO API !!)...just to exceed that 64k limit set by api

Well, my IGCSE mocks just finished yesterday so I was thinking what to do...so just to brush my skills (:D), I made this... We all know what the heck are INI files (if you don't, read their brief description at the bottom)...but did you know that these INI files have a size limit? YES! You see, when you call the Windows API, you will not be able to read files that are bigger than 10kb (on win 9.x i think...correct me if I am wrong) and 64kb on win me/nt/2k. So the next time you try to read a value that is held in position after the 64k/10k mark on a file, all u'll get is a blank (you can do the GetLastError API to see what error was, never tried it though). But HO HO! (look who comes to the rescue) During the past 1 and a half hours (or something), I just wrote a class that will read INI's all by opening them for input and output, and ofcourse, parsing them on their way. So now, throw away ur existing API INI classes and replace these. Features: 1. No more INI File size limit 2. Useful for writing file formats. Yes! For example, I previously wrote an INI script format(crazy idea, huh?) in which some values of keys were actually the names of other keys and in this way, a flow of data can be formed that doesn't have to follow hard-coded format. 3. As fast (well, almost....now, reading a teeny weeny value from a 500kb file that contained 50,000 items took 5 seconds or something on my computer...btw, the file was generated to test the class. Also, there is hardly any noticeable difference between the API and this class even if the file is smaller than 64k). 4. Other features that were included were: Read/Write value (basic INI I/O), Delete a key, Delete the whole darn Section, get all sections (only sectionsuseful for enumerating...file formats!), get all keys with their values all together (useful for enumerating...again file formats!), write values all at once from an array (instead of doing them one by one, which may get slow). 5. It's a drop-in class...just drop and use! very easy parameters to follow :) WHAT INIs ARE: INIs came along with the advent of Windows OSes. They were initially (and, well, still are) are used for storing settings of a program. You can say INI is a standard file format for saving settings (I say standard when I mean Windows standard). Windows supplies APIs that make it easy for us, the developers, to read and write values using just plain strings, which the Windows APIs organises into a format in a file. The format is: 1. There is a section that represents a number of keys (both of which you set) 2. There are keys that represent values (you set the values too) 3. Then there are other sections, 4. with other keys, 5. with other values. 6. blah blah and oh ya, I didn't do an example cuz I think almost everyone might have come across INI files (and anyway, it will take only 3 lines max to write a value to a file using this class) (vote if you like :D...I dont mind, nor do I bite...so criticism [not in a harsh way, mind you] may be appreciated.) Tata!

2002ASP #2560
Create a folder with one line of code no OCX's or other controls

Here you can make a new folder with just ONE line of code. You decide where you wanna place the folder(like 'c:\New Folder\Sub\'). You don't need any extra OCX's or other kind of controls so just take the code and enjoy it. The code is very useful to me and im sure it will be to you too. /Author

2002ASP #2578
Directory Folder

Directory Tree View. This is an activeX control which which looks like windows explore Folder view. This is to display on you drives in a tree control and and desktop, plus my documents and much more.

2002ASP #2601
Change FileTime

This is a compact code that changes the date of an at the moment hard coded file to the time at the moment.

2002ASP #2676
Recurse Subdirectories

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.

2002ASP #2688
Advanced Directory List

This gives you the Windows 95+ directory listing with My Documents, Desktop, etc. Two projects are included in this zip, one that has the project as an executable, one that has it as an ActiveX usercontrol. Simple code, lots of comments. Please leave feedback and vote!

2002ASP #2710
Get the UNC Path

Networked drives. They're an administrative nightmare. In fact, the average user changes his networked drive letters more often than his underwear. But you can solve this problem of binding an application to a particular drive by using a Universal Naming Convention (UNC) path. This still references a network area, but doesn’t tie it to any one drive letter. And you can retrieve and check the UNC of a particular path in code using this neat little function. To use it, simply call GetUNCPath, passing it your drive letter along with a pre-declared empty string. If a problem occurs, the relevant number is passed back with the function. These can be matched with the possible return code constants. However if everything goes swimmingly, the function returns a zero (a constant value of NO_ERROR) and places the UNC path into the ByRef-passed variable. This code works by making a call to the WNetGetConnection function in MPR.DLL. It's essentially a neat wrapper for a regular API call.

2002ASP #2751
How To Write To a INI File

This VERY Simple 5 Line Code Writes To a INI File! Enjoy!

2002ASP #2753
Create a Internet Shorcut on Anyone's Computer

This code will create an internet shortcut on someone's computer. All you have to do it call it with a path and hyperlink!

2002ASP #2757
Fax Server for 2000/NT

With a small bit of coding, you can modify this app to suit your office server environment as a fully function FAX SERVER. You MUST be running WINDOWS 2000 / WINDOWS NT, as these are the only two OS's that have the FAX SERVER Object.

2002ASP #2772
Write Resource To File - Fast!

This is a fast way to write a resource to a file. UPDATE: You can find an example to this code here.

Languages
Top Categories
Global Discovery