Preventing textboxes splitting numbers across rows

Category:
System/API
Type:
Snippets
Difficulty:
Advanced

Author: Anonymous

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
A number of countries have a spave as their thousands separator. The problem with this is that numbers can be wrapped around lines in the edit box which makes them very difficult to read. This snippet prevents that by subclassing the editWordBreakproc:

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: