Various samples of how to accomplish common and advanced tasks in Visual Basic (VB).
How to run your application on systems that don't have all the components installed. Yes, you read that right. These two modules can be used within your applications to provide a means of notifying the user *which* components are missing from the system and provides them with the opportunity to visit your website to download the missing components. See a demonstration in action by downloading XFL (eXtreme Favorites List). If you decide to use this code in your apps *please* let me know. I may provide an online service in the future from this site which would provide links to download missing components. If I don't know you're using it I can't let you know when (and if) I implement this service.
Demonstrates how to shell an application on another computer in the *other computers* memory space. Uses the Winsock control. This is only one example of several ways to perform this type of need.
How to use the GetKeyState API, which let's you do some really cool stuff for detecting system keyboard state - and HOW your application started. Did your application start from the mouse? Did it start from the keyboard? Did the user press Shift (often signaling an 'explore' or advanced feature of an application) and *which* Shift key? Did the user press anything else that might be 'fun' to check?
This project was pasted together basically so I could collect the icons from my own computer. It's a simple utility to extract all the icons from ico files and within resources from a folder/drive on your system and duplicate them into the current directory.
A bas module with a procedure demonstrating how to access the calendar functions of MS Outlook, either in VB or Outlook VBA.
A bas module with several procedures that demonstrate Contact automation of MS Outlook, either in VB or Outlook VBA, including address book creation, deletion and duplication.
A bas module with several procedures that demonstrate Email automation of MS Outlook, either in VB or Outlook VBA, including batch-sending email & customization directly from the Outlook Address Book.
How to use the ItemData property of combo and list controls to identify values within an ADO recordset.
Sample demonstrating how to use '.Find' to locate a record in ADO. Options include exact matching, like matching, automatically searching and searching on a change timer (so you don't have to search at every character change - runs every three seconds when 'on').
How to implement 'Find' & Auto-Search with ADO.
How to use the StdDataFormat object to custom-format columns or set a different 'display value' for a field/column.
Demonstrates the usage of referential image locations. Storing an image within a database field is *possible* but it is very bulky, and database access suffers to implement. Alternatively, it is recommended to store a pointer/path reference to the file and use that to load your image(s).
Demonstrates the usage and implementation of IE to open a POST or GET method to an HTTP server. ie; shows you how to open a browser to send parameters to a web server (like an asp page). Want to remove a dependency from your project? This sample DOES NOT use any controls - it is, and can be, used from a single bas module. Notice the description though - it does require IE (Internet Explorer) to be installed on the client. Which is not a great feat considering every Windows PC since Windows 98 has it installed by default and you can't expect even a Win95 system to live without the OS patches incorporated into an IE installation.
Demonstrates how to store a text value within a binary file. A wav file is used in order to reduce the potential of corruption. Larger files with higher bitrates should work better than small files. Do not use an audio file that uses high-compression because it increases the chance for audio corruption, and thus, the likelihood that a cracker would quickly ascertain the means of your copy-protection scheme.
Demonstrates how to store and retreive values within an INI file by wrapping the GetPrivateProfileString and WritePrivateProfileString API's.
How to implement OLE Drag & Drop.
Demonstrates how to use VB Drag & Drop (not to be confused with OLE Drag & Drop) and scrollbars to move an object within another. In this case an image control is framed inside a picturebox and manipulated with either drag and drop or via the scrollbars.
This sample is a *code-only* solution to encapsulate printing of 3 of 9 Barcode's. It incorporates the ability to include a check digit just by changing a parameter, and change the output color by manipulating a constant. This module is based on a sample George Corrigan posted to several forums I participate in, first to -VB.
Demonstrates two methods for moving objects gradually across their parent object at the pixel level.
How to use the Circle method in VB, as well as the right way to handle key masking.
How to use the CreateSolidBrush, Ellipse and Rectangle API's.
Demonstrates using scrollbars (and drag and drop) to scroll the contents of a form.
How to gracefully exit a long loop.
The stuff you see here is in response to posts for information/howto's from the DevX newsgroups (news.devx.com) or from the many *Groups I monitor (/eGroups/Programming), and those I moderate. If there is something you'd like to know how to do that is not listed here, check the links below, or join one of the groups I do monitor for expert advice.
Other references for great samples:
Without a second thought I recommend VB Accelerator as the most enduring and well designed site for the VB programmer. Other sites I hold in high regard are Edanmo's VB Page, VB Net and Karl Peterson's site.