Reverberations

Bitwise Expressions with Transact-SQL

Posted in .net, Coding, SQL by Brajesh on September 3rd, 2006

About Bit Field enumerations:
In C/C++/.net family of programming languages, there are 2 types of enumerations(enums) -

  1. Simple enums -Sequential or custom.
    e.g. Days of a week
  2. 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

(more…)

.NET : Smooth Scrolling Panel

Posted in .net, Coding by Brajesh on January 10th, 2006

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 = 0×114;
private const int WM_VSCROLL = 0×115;

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);
}
}

Krypton Toolkit, a UI controls lib for .Net, released

Posted in .net by Brajesh on November 15th, 2005

Krypton Toolkit Released

“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.”

Moreover, Component Factory are offering single developer licence of the latest DotNetMagic library for free for spreading the word.

VistaDB 2.1 database for .NET has been released

Posted in .net by Brajesh on November 14th, 2005

VistaDBVistaDB 2.1 database for .NET has been released

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.