Archive for the ‘.net’ Category
About Bit Field enumerations:
In C/C++/.net family of programming languages, there are 2 types of enumerations(enums) –
- Simple enums -Sequential or custom.
e.g. Days of a week
- Flag enums -Bit field. Bitwise operators give us the ability to store multiple settings in a single primitive data type (e.g. an integer). This is useful when a single item has potentially more than one setting of the same type.
e.g. bold, underline, italic style of text
Windows raises ThumbTrack ScrollEvent while dragging Scrollbar. And if your System Visual Effects are optimized for performance, window contents are updated only when scollbar stops ( unlike browser)- that looks ugly and annoying.
To solve this I just substituted all SB_THUMBTRACK messeges with SB_THUMBPOSITION. Not very pretty, but works. The following code is in C#.
public class ScrollPanel : System.Windows.Forms.Panel
private const int WM_HSCROLL = 0x114;
private const int WM_VSCROLL = 0x115;
protected override void WndProc (ref Message m)
if ((m.Msg == WM_HSCROLL || m.Msg == WM_VSCROLL)
&& (((int)m.WParam & 0xFFFF) == 5))
// Change SB_THUMBTRACK to SB_THUMBPOSITION
m.WParam = (IntPtr)(((int)m.WParam & ~0xFFFF) | 4);
base.WndProc (ref m);
“Take your application to the next level with our free library of user interface controls. Designed to work with Visual Studio 2005 and the .NET Framework 2.0 they allow you to create professional looking applications in a fraction of the usual time.
Combine the new MenuStrip and ToolStrip controls with the Krypton Toolkit to create professional Microsoft Office style applications.
Download the free library right now.”
VistaDB is a small-footprint, embedded SQL database alternative to Jet/Access, MSDE and SQL Server Express 2005 that enables developers to build .NET 1.1 and .NET 2.0 applications.
VistaDB features SQL-92 support, 500KB embedded footprint, free 2-User VistaDB Server for remote TCP/IP data access, royalty free distribution for both embedded and server, Copy ‘n Go! deployment, managed ADO.NET Provider, data management and data migration tools.
This 2.1 update includes over 60 improvements, including new support for .NET 2.0 and Visual Studio 2005.
I’ve used VistaDB in some of my applications earlier, and I must say it works like a charm with its incredibly small footprint, instant cold-connect and warm-connect. Here is a well-written review of VistaDB comparing it with MSDE and Jet/Access.