Results for "Author: kamilche"
This example performs a quicksort on multiple keys, on an array of UDT's in memory.
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.
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
Displays the number of days, hours, minutes, and seconds till a specified date. Allows you to enter multiple dates. Illustrates how to use the new ListView control in VB6, saving and retrieving from the registry, and the datediff function.
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?
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.
Start and kill a timer using API calls only! Useful when you need timers that can't be placed on a form.
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.
Puts up a thumbnail size picture of all the pictures in a directory. Single clicking on a thumbnail takes you to a full size preview of that picture.
Converts BMP to JPG 'on the fly' and lets you view the result on-screen. Source code for the DLL included.
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.
Asynchronous Database Processing via Active EXE - When processing thousands of requests for a multi-user real-time application, you cannot afford to wait for the relatively slow database processing to occur. Here's the scenario: You have 1000 people already online and playing your multi-user game, and 10 people in the process of logging on right now. What do you do? You could process the logons right now, searching through thousands of user records, to load up their information - but then the game would appear to 'hang' for everyone already playing, waaaay bogus. You could process only 1 person at a time, in the main processing loop - that's better, but will add unnecessary slowdown to your program. What if you could log on the person in a BACKGROUND process, which wouldn't slow down the existing users? Ooh yeah. Or better yet, hand the request off to a machine across the network, dedicated to database processing? NOW we're talking! :-) You can do this easily, using Visual Basic ActiveX EXE's. Have fun with it!
Control IE through VB! Use the WebBrowser control in VB, and automatically navigate to sites, click buttons, fill in text fields, and more. As an example, I've included the 'NeoPets Helper' I made for my young daughter. NeoPets is a gaming web site that lets you have virtual 'pets'. You play various NeoPets games to earn NeoPoints, so you can feed your pets. However, my daughter's NeoPets were always starving because she couldn't play their games well. :-( So, I made this program for her. Anyways! Don't look at it for the NeoPets tips, look at it for tips on how to control IE through VB! It shows you how to navigate to various sites, wait until they load, click buttons, do generic mouse clicks and drags, extract text from the web page, fill in text fields on the web page, do 'screen scraping', press keys, and more. Feel free to use this program however you wish - but DON'T give me any credit, I don't want to know what you use it for. :-D
Load a Picture object from an array of bytes in memory. Can load any type of picture a normal picture box can load - GIF, JPG, or BMP. Doesn't require the intermediate 'saving of the byte array as a file on the hard drive' step, or an actual picturebox, to blit.
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.
This one-line function returns whether or not a string consists of only the characters A-Z, a-z, and 0-9.
A one-liner that resizes a picture to fit the dimensions of a picturebox. No API calls.
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.
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