Posts

Karna .NET: new release and new forum

The new beta release of Karna .NET is available for download . As usual the full source code + new samples are available . In this release the new Karna.AddIn namespace is introduced. Now Karna supports AddIns technology for making modular applications. Other news: I created new forums related to Karna .NET project Please visit http://apps.sourceforge.net/phpbb/karna These forums will be the preferable support way for Karna .NET Also all announcements for the new releases will be moved from my blog to Karna forum

C# ExcelWriter class

This sample demonstrates how to create a file using the Microsoft Excel Binary Interchange File Format (BIFF). In other words it shows how to produce Excel files from your application directly without using Excel. It can be useful when you are not sure if your customer has Excel installed. // C# ExcelWriter class v1.0 // by Serhiy Perevoznyk, 2008 using System; using System.Collections.Generic; using System.Text; using System.IO; namespace XLSExportDemo { /// <summary> /// Produces Excel file without using Excel /// </summary> public class ExcelWriter { private Stream stream; private BinaryWriter writer; private ushort[] clBegin = { 0x0809, 8, 0, 0x10, 0, 0 }; private ushort[] clEnd = { 0x0A, 00 }; private void WriteUshortArray(ushort[] value) { for (int i = 0; i < value.Length; i++) writer.Write(value[i]); } /// <summary> /// Initializes a new ...

Karna .NET: Beta 11 release

I am pleased to announce karna .Net beta 11 release. The project is growing, the structure become more stable and the final result more visible. In case if you missed the beginning of the story: Karna .NET is freeware C# library for fast developing widgets, docks, screenlets and other types of Internet Desktop Applications, that merges the best qualities and behaviors of the the web and desktop in both end-user experience and in development and deployment. More information is available at the Karna .NET website: http://karna.sourceforge.net

First screenshots of Karna

Image
Today I am publishing first screenshots of my new C# library "Karna". You can download sources of Karna from http://sourceforge.net/projects/karna "Fish eye" Dock Panel Rotating Dock Panel Karna Window

Karna - new project at SourceForge

I started a new project named Karna at SourceForge. What is Karna? Karna .NET is a highly speed optimized C# library for development of screen application engines like widget engines, docks, launchers, etc... Yes, this time no Delphi - this is pure .NET project

EIDNative Library now at SourceForge.net

Image
EIDNative Library (see my previous post) was added to SourceForge http://sourceforge.net/projects/eidnative EIDNative library website now is http://eidnative.sourceforge.net

EIDNative Library new site

Image
Google is going to remove "Page Creator" service. As a result, I migrated EIDNative website http://s.perevoznyk.googlepages.com to http://eidnative.sourceforge.net Anyway, all new updates are always announced here, so just keep reading this blog to know about all new releases. Added 17.09.2010 EIDNative library has the new home again. Please read http://delphi32.blogspot.com/2010/02/ortus-acquires-eidnative-library.html post for more detail.

Belgian eID card access SDK

Image
EIDNative Library is a freeware SDK for Belgian Electronic ID Card. http://users.telenet.be/serhiy.perevoznyk/download/EIDLibrarySetup.zip EIDNative Library includes native API for: * Microsoft .NET * Native Win32 * Visual Basic 6.0 and VBA * Java (only Windows platform) and supports the following programming languages: * All .NET languages (C#, Visual Basic .NET, Delphi .NET, etc...) * Visual C++ * Visual Basic 6.0 * Visual Basic for applications (Microsoft Office) * Delphi * Java Demo projects are included for every supported language. EIDNative Library implements API for every supported language using target language. For example,.NET version is written in C#, Delphi version is written in Delphi and Java version written in Java without using COM or ActiveX. EIDNative library is a first freeware solution for working with Belgian EID cards that compatible with official "Belgian eID Middleware", but not require it. All applications developed using EIDNative Library will run d...

TMemo drag and drop

unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, extctrls; type TForm1 = class(TForm) Memo1: TMemo; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; type TDragEdit = class(TMemo) private FLastSelStart : Integer; FLastSelLength : Integer; FDragImages: TDragImageList; procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; protected function GetDragImages: TDragImageList; override; public constructor Create(AOwner : TComponent); override; property LastSelStart : Integer read FLastSelStart write FLastSelStart; property LastSelLength : Integer read FLastSelLength write FLastSelLength; end; implementation {$R *.dfm} constructor TDragEdit.Create(AOwner: TComponent); begin inherited; ControlStyle := ControlStyle + [csDisplayD...

Determine network status

unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComObj, ActiveX; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation uses ActiveDs_TLB; {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); var wmi : variant; wmiService : variant; nicstatus : variant; card : Olevariant; cnt : integer; Enum: IEnumVariant; P : IUnknown; F : Cardinal; connected : integer; status : string; begin WMI:=CreateOleObject('WbemScripting.SWbemLocator'); wmiService := wmi.ConnectServer('.', 'root\wmi'); nicstatus := wmiService.InstancesOf('MSNdis_MediaConnectStatus'); p := nicstatus._NewEnum; p.QueryInterface(IEnumVariant, Enum); for cnt := 0 to nicstatus...

The IP-to-Country Handbook

The IP-to-Country Handbook The IP-to-Country Database and Tools can be used for: Real Time Geo-Locating (Country) Provide Location Aware Content (language, currency, etc.) Corporate Websites/E-commerce (think global, act local) Fraud Detection (Credit Card Fraud, etc.) On-line Campaign (targeted Banner Ads) Digital Rights Management Web Server Log Analysis Auto-selection of fields on forms (country, currency,language, etc.) Filter access on basis of originating country Spam Filtering Although not 100% accurate, the IP-to-Country Database is about 98% accurate on country recognition. The main reasons for this lie in the existence of dynamic IP addresses and Internet access through proxy servers. Also, it should be noted that the IP-to-Country Database seeks to indicate the country where resources were first allocated or assigned and are not an authoritative statement of the location in which any specific resource may currently be in use. These cases are very difficult and sometimes impo...

Delphi and stuff

Occasional babble mostly related to Borland Delphi Delphi and stuff

Microsoft Patch API

unit Patchapi; interface uses Windows, SysUtils; const PATCH_OPTION_USE_BEST = $00000000; // auto choose best (slower) PATCH_OPTION_USE_LZX_BEST = $00000003; // auto choose best of LZX PATCH_OPTION_USE_LZX_A = $00000001; // normal PATCH_OPTION_USE_LZX_B = $00000002; // better on some x86 binaries PATCH_OPTION_USE_LZX_LARGE = $00000004; // better support for files >8MB PATCH_OPTION_NO_BINDFIX = $00010000; // PE bound imports PATCH_OPTION_NO_LOCKFIX = $00020000; // PE smashed locks PATCH_OPTION_NO_REBASE = $00040000; // PE rebased image PATCH_OPTION_FAIL_IF_SAME_FILE = $00080000; // don't create if same PATCH_OPTION_FAIL_IF_BIGGER = $00100000; // fail if patch is larger than simply compressing new file (slower) PATCH_OPTION_NO_CHECKSUM = $00200000; // PE checksum zero PATCH_OPTION_NO_RESTIMEFIX = $00400000; // PE resource timestamps PATCH_OPTION_NO_TIMESTAMP = $00800000; // don't store new file timestamp in patch PATCH_OPTION_SIGNATUR...

Using waitable timer in Delphi

procedure Wait(lNumberOfSeconds : Longint); const _SECOND = 10000000; var lBusy : LongInt; hTimer : LongInt; liDueTime : LARGE_INTEGER; begin hTimer := CreateWaitableTimer(nil, True, 'WaitableTimer'); if hTimer = 0 then Exit; liDueTime.QuadPart := -10000000 * lNumberOfSeconds; SetWaitableTimer(hTimer, TLargeInteger(liDueTime), 0, nil, nil, False); repeat lBusy := MsgWaitForMultipleObjects(1, hTimer, False, INFINITE, QS_ALLINPUT); Application.ProcessMessages; Until lBusy = WAIT_OBJECT_0; // Close the handles when you are done with them. CloseHandle(hTimer); End; procedure TForm1.Button1Click(Sender: TObject); begin form1.Caption := 'start'; wait(10); form1.Caption := 'done'; end;

Using HourGlass cursor and autorestore it to default application cursor

{***************************************************************************** Name : WaitForTask Author : Perevoznyk Serhiy Description : History : Date By Description ---- -- ----------- 08-07-2005 Perevoznyk Serhiy Initial creation of the Unit. *****************************************************************************} unit WaitForTask; interface uses Windows, Messages, SysUtils, Classes, Controls, Forms; type TCursorRestorer = class(TInterfacedObject) private FCursor : TCursor; FWindowHandle: HWND; FWaitTime : integer; protected procedure WndProc(var Msg: TMessage); public constructor Create(WaitTime : integer =0); virtual; destructor Destroy; override; procedure Restore; end; function Busy(WaitTime : integer = 0) : IUnknown; procedure WaitSleep(MS : Longint); implementation { TCursorRestorer } constructor TCursorRestorer.Create; begin ...

Simple way to execute ADO Query

With this unit you can create and execute queries without using ADO components. The size of application is dramatically smaller.... unit ADOSupport; interface uses Windows, SysUtils, ActiveX, ADOInt; function ExecuteADOSQL(ConnectionString : string; UserName : string; Password : string; command : string) : integer; function CreateADOConnection(ConnectionString : string; UserName : string; Password : string) : _Connection; procedure ExecuteADOQuery(Connection : _Connection; command : string); procedure CloseConnection(Connection : _Connection); implementation function Succeeded(Res: HResult): Boolean; begin Result := Res and $80000000 = 0; end; function CreateADOObject(const ClassID: TGUID): IUnknown; var Status: HResult; FPUControlWord: Word; begin asm FNSTCW FPUControlWord end; Status := CoCreateInstance(ClassID, nil, CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER, IUnknown, Result); asm FNCLEX FLDCW FPUControlWord end; if (Status = REGDB_E_CLAS...

Custom implementation of the GUID generation

{***************************************************************************** Name : GuidGen Author : Perevoznyk Serhiy Description : Custom implementation of the GUID generation History : Date By Description ---- -- ----------- 5/13/05 Perevoznyk Serhiy Initial creation of the Unit. *****************************************************************************} unit GuidGen; interface uses Windows, SysUtils; const PROV_RSA_FULL = 1; CRYPT_VERIFYCONTEXT = $f0000000; ReservedNCS = $00; Standard = $02; ReservedMicrosoft = $06; ReservedFuture = $07; TimeBased = $01; Reserved = $02; NameBased = $03; VRandom = $04; VariantByte = 8; VariantByteMask = $3f; VariantByteShift = 6; VersionByte = 7; VersionByteMask = $0f; VersionByteShift = 4; {:----------------------------------------------------------------------------- The CryptAcquireContext function is used to acquire a handle to a particular key containe...

Ondertitels - Download hier Nederlandse Ondertitels - NLondertitels.com

Ondertitels - Download hier Nederlandse Ondertitels - NLondertitels.com

Useful software

Audacity 1.2.4 http://audacity.sourceforge.net DVD Shrink 3.2.0.15 www.afterdawn.com AutoGK 2.20 www.autogk.me TwinkleSoft MediaRecorder 1.1 www.twinklesoft.com MP3Tag 4.96 www.maniactools.com iTunes 6.0.1.3 www.apple.com/benl/itunes Winamp 5.12 www.winamp.be VLC Media Player 0.8.4 www.videolan.org/vlc MP3Gain 1.2.5 http://prdownloads.sourceforge.net/mp3gain Juice 2.1 http://juicereceiver.sourceforge.net Firefox 1.5 www.getfirefox.com IE View 1.2.7 https://addons.mozilla.org/extensions FlashGot 0.5.9.98 http://flashgot.net Adblock 0.5.2.056 https://addons.mozilla.org/extensions Sage https://addons.mozilla.org/extensions ScrapBook https://addons.mozilla.org/extensions FoxyTunes 1.2 www.foxytunes.org Skype 2.0.0.43 http://skype.com MSN Messenger 7.5 http://messenger.msn.be Messenger Jump! www.softonic.com Trillian 3.1 www.ceruleanstudios.com RoboForm 6.5 www.roboform.com Xfire 1.48 www.xfire.com Hitman Pro 2.3.3 www.hitmanpro.nl Windows Antispyware 1.0.701 www.microsoft.com/antispyware X...

Delphi beacon

Delphi beacon My personal web-site, related to Delphi development. It contains components (freeware), articles and more...