MemAccess Library get "Safe to Install" award 
MemAccess Library get "Safe to Install" award from FindMySoft.



MemAccess Library does not contain any spyware, trojans or viruses and it is considered to be "Safe To Install".

[ 37 comments ] ( 3198 views )   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 2.9 / 2140 )
Make a ListBox display a different tooltip for each item  
A customer required a sample that make a CheckListBox display a different tooltip for each item. We modified a sample from Aaron Young to demonstrate how to display tooltips for each item in a CheckListBox control.



You can download this sample from here.

[ 15 comments ] ( 14313 views )   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 3 / 4579 )
How to use ItemBackColor and ItemFont properties in Visual Basic.NET 
A user asked us how to upgrade a Visual Basic 6.0 project of CheckListBox ActiveX control with ItemBackColor and ItemFont properties.

VB.NET doesn't treat ItemForeCOlor and ItemBackColor as common properties, you need use setItemForeColor or setItemBackColor method to change the fore color or back color of an item.

VB.NET program uses a complete new Font object, so you need change your code as followings.

' load in program names
lstProgram.AddItem(" " & ProListName)

lstProgram.set_ItemBackColor(lstProgram.NewIndex, &HC0FFFF)
lstProgram.set_ItemForeColor(lstProgram.NewIndex, &HFFFF00)

Dim fontFamily As New FontFamily("Arial")
Dim oldFont As Font = _
lstProgram.get_ItemFont(lstProgram.NewIndex)
Dim fnt As New Font(fontFamily, oldFont.Size, _
oldFont.Style Or FontStyle.Bold)
lstProgram.set_ItemFont(lstProgram.NewIndex, fnt)


Please refer to following links for more details:
1) How to: Construct Font Families and Fonts
2) Font Constructor

[ 6 comments ] ( 867 views )   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 2.9 / 328 )
How to support higher address than 32767 in C# 
If you use following statement in your C# program:

MessageBox.Show(NTPort.Inp(0xfc00).ToString());

You will get two errors:

Error 1 The best overloaded method match for 'NTPort.Inp(short)' has some invalid arguments
Error 2 Argument '1': cannot convert from 'int' to 'short'


Both errors are caused by incorrect declaration in NTPort.cs. In NTPort.cs, all port addresses are declared as short. We need change them from short to ushort. We only change the data type of port addresses, not other parameters, to keep backwards compatible.

The latest version of NTPort.cs is as follows,


using System;
using System.Runtime.InteropServices;
using System.Text;

/// <summary>
/// C# Class for NTPort Library
/// Copyright (c) 1997-2008 Hai Li, Zeal SoftStudio.
/// E-Mail: support@zealsoft.com
/// Web: http://www.zealsoft.com
/// </summary>
public class NTPort
{
// Returns a value indicating the last operation is successful or not.
// int WINAPI GetLastState(char *s);
[ DllImport( "Ntport.dll", EntryPoint="GetLastState", CharSet=CharSet.Auto )]
public static extern int GetLastState(
[MarshalAs(UnmanagedType.LPStr)] StringBuilder sError );

// Enable your application to read or write specific ports.
// void WINAPI EnablePorts(WORD PortStart, WORD PortStop);
[ DllImport( "Ntport.dll", EntryPoint="EnablePorts", CharSet=CharSet.Auto )]
public static extern void EnablePorts(ushort nPortStart, ushort nPortStop);

// Disable your application to read or write specific ports.
// void WINAPI DisablePorts(WORD PortStart, WORD PortStop);
[ DllImport( "Ntport.dll", EntryPoint="DisablePorts", CharSet=CharSet.Auto )]
public static extern void DisablePorts(ushort nPortStart, ushort nPortStop);

// Returns a value indicates whether the application is running under Windows NT/2000/XP/Server 2003 system.
// BOOL WINAPI IsWinNT();
[ DllImport( "Ntport.dll", EntryPoint="IsWinNT", CharSet=CharSet.Auto )]
public static extern bool IsWinNT();

// Returns a value indicates whether the application is running under 64-bit Windows system.
// BOOL WINAPI IsWin64();
[ DllImport( "Ntport.dll", EntryPoint="IsWin64", CharSet=CharSet.Auto )]
public static extern bool IsWin64();

// Returns a value from specific ports.
// WORD WINAPI Inport(WORD PortNum);
[ DllImport( "Ntport.dll", EntryPoint="Inport", CharSet=CharSet.Auto )]
public static extern byte Inport( ushort nPortAddress );
// WORD WINAPI Inp(WORD PortNum);
[ DllImport( "Ntport.dll", EntryPoint="Inp", CharSet=CharSet.Auto )]
public static extern byte Inp( ushort nPortAddress );
// WORD WINAPI Inpw(WORD PortNum);
[ DllImport( "Ntport.dll", EntryPoint="Inpw", CharSet=CharSet.Auto )]
public static extern short Inpw( ushort nPortAddress );
// WORD WINAPI InportW(WORD PortNum);
[ DllImport( "Ntport.dll", EntryPoint="InportW", CharSet=CharSet.Auto )]
public static extern short InportW( ushort nPortAddress );
// DWORD WINAPI Inpd(WORD PortNum);
[ DllImport( "Ntport.dll", EntryPoint="Inpd", CharSet=CharSet.Auto )]
public static extern short Inpd( ushort nPortAddress );
//DWORD WINAPI InportD(WORD PortNum);
[ DllImport( "Ntport.dll", EntryPoint="InportD", CharSet=CharSet.Auto )]
public static extern int InportD( ushort nPortAddress );

// Write a value to specific ports.
// void WINAPI Outp(WORD PortNum, WORD Data);
[ DllImport( "Ntport.dll", EntryPoint="Outp", CharSet=CharSet.Auto )]
public static extern void Outp( ushort nPortAddress, short nData);
// void WINAPI Outport(WORD PortNum, WORD Data);
[ DllImport( "Ntport.dll", EntryPoint="Outport", CharSet=CharSet.Auto )]
public static extern void Outport( ushort nPortAddress, short nData);
// void WINAPI Outpw(WORD PortNum, WORD Data);
[ DllImport( "Ntport.dll", EntryPoint="Outpw", CharSet=CharSet.Auto )]
public static extern void Outpw( ushort nPortAddress, short nData);
// void WINAPI OutportW(WORD PortNum, WORD Data);
[ DllImport( "Ntport.dll", EntryPoint="OutportW", CharSet=CharSet.Auto )]
public static extern void OutportW( ushort nPortAddress, short nData);
// void WINAPI Outpd(WORD PortNum, DWORD Data);
[ DllImport( "Ntport.dll", EntryPoint="Outpd", CharSet=CharSet.Auto )]
public static extern void Outpd( ushort nPortAddress, int nData);
// void WINAPI OutportD(WORD PortNum, DWORD Data);
[ DllImport( "Ntport.dll", EntryPoint="OutportD", CharSet=CharSet.Auto )]
public static extern void OutportD( ushort nPortAddress, int nData);

// Set the registration information.
// void WINAPI LicenseInfo(LPSTR sUserName, DWORD dwKey);
[ DllImport( "Ntport.dll", EntryPoint="LicenseInfo", CharSet=CharSet.Auto )]
public static extern void LicenseInfo(
[MarshalAs(UnmanagedType.LPStr)]String sUserName, int dwKey);

// Returns the version of NTPort Library.
// WORD WINAPI GetNTPortVersion();
[ DllImport( "Ntport.dll", EntryPoint="GetNTPortVersion", CharSet=CharSet.Auto )]
public static extern short GetNTPortVersion();

// Set the setting of fast mode
// void WINAPI SetFastMode(BOOL bOption);
[ DllImport( "Ntport.dll", EntryPoint="SetFastMode", CharSet=CharSet.Auto )]
public static extern void SetFastMode(bool bOption);

// Get the current setting of fast mode
// BOOL WINAPI GetFastMode();
[ DllImport( "Ntport.dll", EntryPoint="GetFastMode", CharSet=CharSet.Auto )]
public static extern bool GetFastMode();

// Get the base address of LPT port
// WORD WINAPI GetLPTPortAddress(WORD PortNo);
[ DllImport( "Ntport.dll", EntryPoint="GetLPTPortAddress", CharSet=CharSet.Auto )]
public static extern ushort GetLPTPortAddress(short nPortNo);

public const int ERROR_NONE = 0;
public const int ERROR_DRIVER = 2;
public const int ERROR_SCM_CANT_CONNECT = 9998;

public NTPort()
{
//
// TODO: Add constructor logic here
//
}
}


[ 9 comments ] ( 1996 views )   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 2.9 / 347 )
Shortcuts Map editorial award 
Shortcuts Map receives 5 stars award from Best-software4u.



Shortcuts Map will help you to manage hotkeys assigned to shortcuts on the desktop or in the Start menu hierarchy. With the straightforward user interface, you can easily to change a hotkey or find an unused hotkey.

[ 144 comments ] ( 4558 views )   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 2.6 / 298 )
FIX: CheckListBox ActiveX can't be registered 
Our customers reported our CheckListBox ActiveX can't be registered under some systems. Now, this bug is fixed. In our evaluation version, sometimes setup program will install x64 edition of chklsb26.ocx into 32-bit system directories. We update our evaluation version to fix this bug. Because no other files are updated, we don't change the version number. This bug doesn't exist in registered version and upgrade version.

Download update version of evaluation version from here .

[ 131 comments ] ( 15482 views )   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 3 / 1663 )
NTPort Library has received a 5 Stars Rating at PCWin.com 
This a new award for NTPort Library. Visit NTPort Library page at PCWin.com.


[ 128 comments ] ( 11131 views )   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 3 / 2184 )
NTPort Library now supports Windows Vista! 
We are excited to announce the new release of NTPort Library, version 2.8 .

In this version, we officially support Windows Vista, both x86 and x64 version . From July 2006, we worked on Windows Vista, and released beta versions to our registered users. We got valuable feedbacks from our testers. Now, I think it's the time to release it to all users. Two major updates, signed kernel driver and HTML Help(.chm format), are made for Windows Vista. A screen shot of PortTest sample running in Windows Vista is shown below.



We also addJBuilder 2007 & Eclipse samples to this version. We will continue to develop more samples for our customers.

Since last version, Microsoft and CodeGear have released their new development tools. We are registered partner of Microsoft and Technology Partner of CodeGear. Of course, we provide full support of Visual Studio 2008 and CodeGear RAD Studio 2007 in this version.

Although x64 edition of Windows is not so popular as x86 edition, we continue to improve our x64 support. We rewrite the merge module for Windows Installer, so that it can work with both 32-bit and 64-bit installer.

A small feature is missing in this version. We removed Wise Installation System 8.0 sample. which is out-of-date.

If you are a registered user, please go to update page to download the upgrade version. If you are a new user, please go to download page to get a full feature evaluation version.

[ 10 comments ] ( 596 views )   |  [ 0 trackbacks ]   |  permalink  |  related link  |   ( 3 / 356 )

Next