Difference between revisions of "Code samples"
From HashVB
m (Moving page onto the wiki) |
m |
||
Line 42: | Line 42: | ||
* [[Open a URL|Open a URL in a web browser]] | * [[Open a URL|Open a URL in a web browser]] | ||
* [[Sleep_Without_the_Freezing|Sleeping without freezing the program]] (uses DoEvents) | * [[Sleep_Without_the_Freezing|Sleeping without freezing the program]] (uses DoEvents) | ||
− | * [[Why_DoEvents_Are_Evil|Why DoEvents | + | * [[Why_DoEvents_Are_Evil|Why DoEvents can cause problems]] |
* [[Windows version|Detecting the version of Windows]] | * [[Windows version|Detecting the version of Windows]] | ||
* [[Close_Without_End|How to close your app without using End]] | * [[Close_Without_End|How to close your app without using End]] |
Revision as of 14:09, 3 November 2005
Below are a selection of VB code samples. Feel free to use any of them in your own projects.
Contents
Variables
- How do you tell if a number is an integer?
- Obtain the type name for a variable
- Pass a user defined type to a class
COM objects
- Firing events in an object from a code module
- Modularised Subclassing using interfaces and CopyMemory
- Creating singleton objects
User interface
- How to Catch Mouse Hover and Out Events
- How to catch KeyPresses on a form when a control has focus
- XP Styles in your application
GDI
Text boxes
Windows
- Making a window "Always on top"
- Dragging windows/controls the easy way
- How to create a tool window that floats above your app
- How to subclass a window to catch useful windows messages
- Modularised Subclassing using interfaces and CopyMemory
File handling
- File I/O. Reliably
- Getting special folder paths
- How to iterate through a directory structure using APIs