Results for "Author: kamilche"
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
A one-liner that resizes a picture to fit the dimensions of a picturebox. No API calls.
Shows how to use the Multimedia control that comes with VB, to record a WAV file using audio compression. No API's necessary!
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).
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
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.
Explains how to hook a 'lookup' combobox to a data field at runtime. Doesn't use the ADO control - uses pure recordset manipulation. Illustrates what the differences are between 'DataSource' 'RowSource', 'BoundColumn', 'DataField', and 'ListField'. M$ documentation is truly bad at explaining this topic.
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.
This program allows you to play audio and video files in various formats, including MP3, Ogg, WAV, WMA, AVI, and more. It uses DirectShow, and doesn't require any DLL's or custom OCX's.
There's many different ways to store data in VB. This application tests a few of them. You shouldn't blindly choose the method that has the highest numbers! You should choose a method based on the usage pattern of your data. For instance, even though the timings say 'clsDirect' is fastest, for my application, a combination of clsHash and clsList proved to work 50% faster. If you don't know which method is best, try them all - they all implement interface IContainer, and swapping out one for another is a simple one-line code change.
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.
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).
This example illustrates how to save objects to XML files, and load objects from XML files, via serialization.
There are no drivelist, dirlist, or filelist controls available in VB.net. This example shows how to use a treeview to display a list of folders to a user, and allow the user to select a file. Compatible with VB 2005.
Explains how to hook a 'lookup' combobox to a data field at runtime. Doesn't use the ADO control - uses pure recordset manipulation. Illustrates what the differences are between 'DataSource' 'RowSource', 'BoundColumn', 'DataField', and 'ListField'. M$ documentation is truly bad at explaining this topic.
This program allows you to play audio and video files in various formats, including MP3, Ogg, WAV, WMA, AVI, and more. It uses DirectShow, and doesn't require any DLL's or custom OCX's.
There's many different ways to store data in VB. This application tests a few of them. You shouldn't blindly choose the method that has the highest numbers! You should choose a method based on the usage pattern of your data. For instance, even though the timings say 'clsDirect' is fastest, for my application, a combination of clsHash and clsList proved to work 50% faster. If you don't know which method is best, try them all - they all implement interface IContainer, and swapping out one for another is a simple one-line code change.
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
Via API calls, has the user choose a directory. No commondialog needed!