Atlanta Custom Software Development 

   Search        Code/Page

User Login



Forgot the Password?
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
VB VB (1648) (736)
C# C# (15) (779)
ASP ASP (41)
VC++ VC++ (25)
JScript JScript (5)
» SQL Server (708)
» ORACLE (5)
» MySQL (0)
» DB2 (0)
» C/C++/ASM (11)
» Microcontroller (1)
» Circuit Design (0)
» Networking (5)
» Unix/Linux (1)
» WinNT/2k/2003 (8)
» Flash (0)
» Maya (0)
» 3D max (0)
» Photoshop (0)
» (2)
» PC Interfacing (1)
» Networking (4)
» SQL Server (4)
» VB (23)
» (4)
» VC (3)
» HTML/CSS/JavaScript (10)
» Regular Expr Tester
» Free Tools


A template for building collection class modules
Total Hit (1830) The following is a template for building collection class modules in a very quick and effective way. Copy-and-paste this code into Notepad, that save it to a file named "COLLECTION CLASS.CLS" in the \TEMPLATE\CLASSES subdirectory under the main VB6 directory: «Code LangId=1» VERSION 1.0 CLASS B ....Read More
Better type checking in Variant properties that can accept objects
Total Hit (1377) As explained in the Mistake Bank you need all three flavors of Property procedures to correctly implement a Variant property that can take either an object or a non-object value. Surprisingly enough, in this case you don't need that the argument of the Property Set procedure be declared As Variant. ....Read More
Default Properties tend to hide programming mistakes
Total Hit (1296) Visual Basic lets you create a default property or method by simply selecting the "(Default)" item in the combo box that appear if you click the Advanced button in the Procedure Attributes dialog box. (You can display this dialog from the Tools menu, or by right-clicking on a property name in the ri ....Read More
Don't test auto-instancing variables using Is Nothing
Total Hit (1375) You can't reliably test an auto-instancing object variable using the Is Nothing test, because as soon as you reference the variable Visual Basic silently creates an object of the given class, and the test always returns False: «Code LangId=1» Dim x As New MyClass If x Is Nothing Then ' this ....Read More
Friend Procedures are faster than Public ones
Total Hit (1414) It might surprise you to learn that Friend procedures are sensibly faster than Public ones. You can prove this yourself by creating an ActiveX EXE project with one Private class and one Public class (Instancing = MultiUse), and then add the following code in both class modules: «Code LangId=1» P ....Read More
Implement Write-Once Read-Many Properties
Total Hit (2095) Creating a read-only property or a write-only property isn't difficult, as you probably know: just omit the Property Let (or Set, if dealing with objects) or the Property Get procedure, respectively. There are cases, however, when you want to implement a write-only-read-many property, that is, a ....Read More
Passing Public class variables by reference
Total Hit (1409) Under VB4 Public variables in form and class modules were implemented in the same manner as variables in BAS modules, that is, as direct references to memory locations. This allowed VB programmers to create procedures that modified values passed by reference, as in: «Code LangId=1» '--- the CIn ....Read More
Use Objptr function to quickly locate an object in a Collection
Total Hit (1627) One of the simplest and most effective uses of the ObjPtr function is to provide a key for quickly locating an object in a Collection. Let's suppose you have a collection of objects that don't have a property that can be used as a key to retrieve them in a collection. You can work around this by usi ....Read More
Use ObjPtr to test whether two object variables point to the same object
Total Hit (1291) The standard way to test whether two object variables point to the same object is through the Is operator, as in: «Code LangId=1» If obj1 Is obj2 Then ... «/Code» However, when both object are of the same type, or point to the same secondary interface, you can slightly optimize your code by t ....Read More
Using CallByName with nested objects
Total Hit (1597) Sometimes Microsoft documentation can be, well lacking is a kind word, and one is reluctant to call tech support when they smoke your credit card first, and ask questions later. My problem was that the CallByName procedure was refusing to call nested lasses. To see what I mean, consider that if y ....Read More
CQueue - a class module to implement First-In-First-Out (queue) structures
Total Hit (1633)
CStack - a class module for implementing Last-In-First-Out (stack) structures
Total Hit (1357)
HashTable - a class module for storing (key,value) pairs
Total Hit (1857)
LinkedList - a class module to store list of values
Total Hit (1434)
ObjFromPtr - Return an object from its pointer
Total Hit (1891)

Recommanded Links


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.