Results for "Author: kamilche"
A VB replacement for the old WebCam 2000 software, which no longer works under Windows 2000. It's a WebCam with a difference - it doesn't take the picture until a request comes in! This is good for lowering the hits on your CPU AND bandwidth, because it doesn't waste its time taking a picture and uploading it every 5 minutes like most WebCams do. It sits on port 2000, and when a request comes in, it grabs the picture via TWAIN, saves it as a JPG, and sends the picture to the person.
Shows how to use the Multimedia control that comes with VB, to record a WAV file using audio compression. No API's necessary!
A one-liner that resizes a picture to fit the dimensions of a picturebox. No API calls.
A simple video capture program, in only 44 lines of code. Now includes a button to change video size, and a button to change video source. For a more complete implementation, go to Ray Mercer's site at www.shrinkwrapvb.com
This one-line function returns whether or not a string consists of only the characters A-Z, a-z, and 0-9.
A simple program that plays notes and draws multicolored squares every time a baby smashes any key. Illustrates how to play notes and entire songs with the Beep API, how to force a window to the foreground even in Windows 2000, how to draw a random colored and sized rectangle, and how to 'appear' to disable the Windows key under Windows 2000 (where SystemParametersInfo doesn't work).
Given a pathname, the class in this program returns a sorted list of directories or filenames in a string array, without the use of the drivelistbox, dirlistbox, or filelistbox controls. This program illustrates several important programming concepts, including quicksort, passing arrays to and from procedures, and handling undimensioned arrays. In addition, it's very easy to use.
Stop the infernal blinking of the scrollbar in VB6.
Drag a form that has no titlebar! Add the routine listed below, and call it in the 'MouseDown' event of the form (or a control on the form): MoveWindow Me.Hwnd
Given a pathname, this function will return a string containing a list of all files in that folder plus subfolders. Much easier than other examples posted here! A single recursive function, with no API's or special types needed.
The book "Tricks of the Game Programming Gurus" by Andre LaMothe, copyright 1994, has an interesting chapter on artifical intelligence. However, all the samples in the chapter are done up in C. I've redone them into VB just for the heck of it. There are 5 simple programs illustrating chasing, evasion, patterned movement, random movement, and a program that combines all of the above.
Adds the text to a textbox, checking for length overflow. First, it checks, and if the textbox exceeds 15,000 characters, it strips out all but the last 2000 characters to make room for the new text. It doesn't break in the middle of lines - it only deletes 'whole lines.' Then it adds the text to the end, using the color you specified (if any), and scrolls to the end of the textbox. I use it all the time, got tired of cutting/pasting out of old projects, thought I'd put it here on PSC.
Displays a 3D room with textures and lights, and lets the user move around in it. Uses DirectX Retained Mode.
A simple slider control with no tickmarks, that looks attractive at small sizes (no appearance bug like exists in VB6's control). In addition, clicking on the slider bar jumps the thumb directly to that point - there's no need to 'page up' and 'page down' continuously to get there.
This example illustrates how to set up inheritance in VB, without using containment ('has-a') processing. The data structure is very flexible, as each class and object instance is basically a hash table (a dictionary in VB). It usess 'CallByName' to call the appropriate routine based on type, at runtime. Note that this could be made much more efficient and speedy by using a custom hash table class and enums instead of strings for properties, but I left that out to simplify this example.
BlitEngine is a 'mini graphic engine' suitable for games. It uses no DirectX - these are pure GDI API calls. It illustrates several concepts, including transparent blitting, 'dirty rectangle' processing, double buffering, multiple on-screen sprites on the screen, loading pictures into memory bitmaps instead of picture boxes, 8-bit vs. 24-bit color, 'inverse masks' which enable transparency, tracking frames per second, animating graphics on the screen, implementing a 'demo' mode, and more. With this app, I get 42 frames per second on a 233 mhz Pentium and 140 frames per second on a 350 mhz Compaq. What speed do YOU get, on what machine?
A Javascript perpetual calendar optimized for printing. It handles holidays, birthdays, and events with timing like 'The fourth Thursday in November' (Thanksgiving) and 'The last Monday in May' (Memorial day).
Prints out a 'table of contents' for your Visual Basic program, which contains method names, syntax, and comments only. Useful as 'cover sheets' for the actual code printout.
Are you tired of Outlook and Outlook Express hanging your machine, and letting the KAK virus in? Well, I am too, so in response, I made EZMailer, a simple email program that sends and receives mail, PERIOD. It doesn't attempt to interpret or auto-execute ANYthing, thus sparing you from the vagaries of security loopholes in 'advanced' mail programs. This program receives incoming mail from a POP3 server, sends outgoing mail through an SMTP server, handles MIME attachments, multiple users, and automatically routes incoming mail to folders based on criteria you specify. Note that to successfully execute this code in the runtime environment, you must own Apex Software's TrueDBGrid Pro, www.apexsc.com; and Funduc's Encode/Decode DLL, www.funduc.com
Inspired by the 'Sparks' example entered by Itay Sagui, this demo shows how to display sparks flying out of your mouse, against a background picture, with a programmer-defined color.