Reverberations

News, Views, Rants and Raves About Technology and More

Archive for the ‘.net’ Category

Bitwise Expressions with Transact-SQL

with 5 comments

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

Read the rest of this entry »

Written by Brajesh

September 3, 2006 at 8:29 pm

Posted in .net, Coding, SQL

.NET : Smooth Scrolling Panel

with 4 comments

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

Written by Brajesh

January 10, 2006 at 2:56 pm

Posted in .net, Coding

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

leave a comment »

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.

Written by Brajesh

November 15, 2005 at 3:20 pm

Posted in .net

VistaDB 2.1 database for .NET has been released

with one comment

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.

Written by Brajesh

November 14, 2005 at 8:25 pm

Posted in .net