Delphi 2010 – Cost & Manipulations

November 30th, 2009

Barely have I installed Delphi 2009 and Embarcadero are now touting Delphi 2010.  Not only but also they are asking me to shell out an additional 2,229.00 Euros for an upgrade. Yes, you read that right, 2,229.00 Euros for an UPGRADE.  I am astonished. I would very much like to give it a go but at those prices, how many developers out there can afford it?

I recently downloaded MS Visual C++ 2008 Express Edition which Microsoft offer for FREE. Yep, free. And what else? Well, let me tell you, it ain’t that bad. It’s a few years since I touched C++ but a month of work with it should bring me up to speed. Come on Embarcadero, please don’t do a Borland on us and kill off Delphi by pricing it out of the reach of the people who really will use it.  It is really starting to feel like the new owners of Delphi are, like their predecessors, taking Delphi down a very narrow road to increased revenue.  Manipulations? Well, yes, maybe there are some related to the price, but also, reading Chris Bensen’s blog, I see Delphi 2010 has lots of new units, including

“Manipulations.pas
The inertia manipulators. Great for spinning and throwing things around your screen.”

Sounds great, but a google is not returning much, and I don’t see anything about them on the Embarcadero site. I’ll keep you posted when I find more details.

Delphi

Firefox Addons, XUL, XPCOM, Delphi and a few headaches

November 30th, 2009

I wanted to share some information on creating Firefox addons/extensions (or however you care to refer to them). Not any old Firefox addons but XPCOM addons. It’s taken a couple of weeks of evening work to turn my Graabr Delphi application (www.graabr.com) into a Firefox Addon. Why bother?  Audience, I guess.

Anyhow, creating a non-XPCOM addon using javascript is relatively straightforward. But, an XPCOM is a different story. You need some Delphi-friendly Firefox header files which do not appear up-to-date. You also need a whole lot of patience. I found lots of snippets of info on Delphi XPCOM, but most ‘answers’ only raised further issues. Eventually, I rebuilt Graabr as a Delphi dll with three exposed interfaces. That is not enough for Firefox though. You cannot simply call a Delphi dll from Firefox, not without all the Firefox libs. So, what next? A download of the now free Visual C++ 2008 Express Edition (http://www.microsoft.com/Express/VC/). Incidentally, and one for another post, why is Delphi 2010 so expensive? After download and install, a lot of googling to get a XLRunner sample working in C++. Then, build a C++ dll wrapper, compatible with Firefox around the Delphi DLL. And voila, problem solved. Here is a link to the finished Graabr add-on:

https://addons.mozilla.org/en-US/firefox/addon/52178/

So, how does everything hang together? Well, after creating the extension framework, or environment, with all the required folders, files, etc (see here: https://developer.mozilla.org/en/Building_an_Extension), I created a small javascript app. which interfaces between Firefox and the C++ DLL. You can examine the source of this file by looking in the FF extension folder.  The javascript calls the C++ DLL which in turn calls the good old Delphi DLL where all the screen grabbing, uploading, etc work is done.  After creating the environment, files, structure, etc, you zip it all up into a .xpi file (zippy as they call it) and upload it to FireFox addons.

Oh, it’s oh so simple :)

Delphi, graabr , , , , ,

Firefox, extensions, GUIDs and more

November 14th, 2009

First: How to generate a GUID in the Delphi IDE: Ctrl+Shift+G

Ahhh. That out of the way.  There is so little info around on how to create Firefox extensions using Delphi. I’m working on it now for Graabr (www.graabr.com). Update soon.

Delphi

Busy Times

November 8th, 2009

It’s been busy times for the Wizard Soft team lately. We’ve just completed work on a new Wordpress plugin and Desktop application for Pixavid.

Here is a link to the Desktop application, written in Delphi (of course) and calling Pixavid’s API routines via XML:

http://www.pixavid.com/download.php

and here is a link to the Wordpress plugin, using CURL to call the same Pixavid APIs:

http://wordpress.org/extend/plugins/pixavid-random-pics/

pixavid

Delphi 2009 – first install

October 9th, 2009

Well, I finally bought my copy of Delphi 2009 and installed it on Windows 7 (64-bit). First impressions? Good. Moving the libraries and components from 2007 was a breeze (for change) and within a couple of hours we were up with a compiling versions of most of our 2007 Delphi apps. One exception, and a big one, one of our international apps for a Russian client which makes extensive use of TNT controls for cyrillic text display. It will take about a week to convert. Hmm, looking forward to that then. Oh, one more thing, a debugger exception which is causing some issues on the 64 bit version of Windows.

Delphi

CPU Speed Pro

September 8th, 2009

CPU Speed Pro now celebrating just over a year of downloads. How many? 1,234,578 individual machines tested. We are very proud that cpu speed pro is so popular. Google are giving us a number one ranking for the cpu speed keywords, so kind. Happy birthday CPU Speed Pro.

cpuspeedpro-main

www.cpuspeedpro.com

Software

Screen/Desktop grab in Delphi

August 2nd, 2009

Ever wanted to grab all the desktop/screen in Delphi? Right, me too. I spent a lot of time searching around for different options, as usual, google is your friend. Lots of info available on the web but this code snippet works well:

{------------------------------------------------------------------------------}

procedure TfmMain.Grab(bm: TBitMap; gt : GrabType);
var
 DestRect, SourceRect: TRect;
 h: THandle;
 hdcSrc : THandle;
 pt : TPoint;
begin
hdcSrc := 0 ;
 case(gt) of
 GTWINDOW, GTCLIENT : h := GetForeGroundWindow;
 GTSCREEN : h := GetDesktopWindow;
 else h := 0;
 end;
 if h <> 0 then
 begin
 try
 if gt = GTCLIENT then
 begin
 hdcSrc := GetDC(h); // use this for ClientRect
 Windows.GetClientRect(h,SourceRect);
 end
 else
 begin
 hdcSrc := GetWindowDC(h);
 GetWindowRect(h, SourceRect);
 end;
 bm.Width  := SourceRect.Right - SourceRect.Left;
 bm.Height := SourceRect.Bottom - SourceRect.Top;
 DestRect := Rect(0, 0, SourceRect.Right - SourceRect.Left, SourceRect.Bottom - SourceRect.Top);
 StretchBlt(bm.Canvas.Handle, 0, 0, bm.Width,
 bm.Height, hdcSrc,
 0,0,SourceRect.Right - SourceRect.Left,
 SourceRect.Bottom - SourceRect.Top,
 SRCCOPY);
 if gt = GTCLIENT then
 begin
 pt.X :=SourceRect.Left;
 pt.Y :=SourceRect.Top;
 // call Windows.ClientToScreen() to translate X and Y
 Windows.ClientToScreen(h, pt);
 // DrawCursor(bm,pt.X, pt.Y);
 end
 //
 else
 begin
 // DrawCursor(bm,SourceRect.Left, SourceRect.Top);
 end;
 finally
 ReleaseDC(0, hdcSrc);
 end;
 end;
end;

Code snippet, Delphi

Net Meter Pro

July 14th, 2009

netmetermain-fullsize

A shameless plug for our newest flagship application: Net Meter Pro!

Monitor your computer’s internet bandwidth using Net Meter Pro, the powerful new all-in-one network tool. SEE the information flowing to and from your computer with dynamic real-time data graphs.

Read more at:

www.netmeterpro.com

Software

Delphi application showcase

June 5th, 2009

If you are the author of a Delphi application and would like to tell others about your work, there are two Delphi community related avenues of exposure. The first is an independent wiki list where you can add your listing immediately:

Good Quality Applications written in Delphi

The second is Embarcadero’s official Delphi Application Showcase, at http://www.embarcadero.com/application-showcase.

You will need to complete a short survey and then wait…  Tim Del Chiaro appears to have some responsibility for submissions, or at least he is the contact for screenshot submissions related to the showcase.

Delphi

Delphi 2009

May 8th, 2009

Got it yet?

Evidently Delphi 2009 is available in three editions. The Professional edition is designed for building desktop and workstation applications, whilst the Enterprise edition includes everything in the Professional edition, and adds support for building client/server and multi-tier database and web applications. The Architect edition includes everything in the Enterprise edition, plus logical and physical database modeling and optimizations from the Embarcadero ER/Studio Developer Edition.

Delphi

The times they are a changing

April 12th, 2009

A friend asked me recently why I was still coding in Delphi, when all the ’serious’ coding is now done on the web. It’s an interesting question. More and more I find we are integrating our Delphi development with some form of web solution. Usually it’s a combination of php/xml and Delphi. I do wonder though, as time progresses and browsers do indeed become more sophisticated, whether we really will still be coding in our good old Delphi.

Delphi, Uncategorized

Getting the local ip address with Delphi

March 22nd, 2009

Ever wanted to get your computer’s local ip address?  Well here’s a code snippet to help you along!

{——————————————————————————}

function LocalIP: string;
type
TaPInAddr = array[0..10] of PInAddr;
PaPInAddr = ^TaPInAddr;
var
phe: PHostEnt;
pptr: PaPInAddr;
Buffer: array[0..63] of Char;
I: Integer;
GInitData: TWSAData;

begin
WSAStartup($101, GInitData);
Result := ”;
GetHostName(Buffer, SizeOf(Buffer));
phe := GetHostByName(buffer);
if phe = nil then Exit;

pPtr := PaPInAddr(phe^.h_addr_list);

I := 0;

while pPtr^[I] <> nil do
begin
Result := inet_ntoa(pptr^[I]^);
Inc(I);
end;

WSACleanup;
end;

Delphi ,

Password Safe 4

February 1st, 2009

I’ve just updated Password Safe to version 4. This is the latest incarnation of a Delphi application which was first conceived four years ago. Password Safe 4 contains updates to the encryption algorithm and changes to the the way the data is stored. Consequently, the database structure is not backwards compatible with earlier versions. I use encrypted XML to store the data, which is located in a sub folder of the application location. There are no ini or registry entries created and Password Safe 4 is fully portable, making it perfect for running from a thumb drive.

http://www.password-safe.net/

Software

Delphi 2007 – How to make it Fast and Stable

January 30th, 2009

A friend (thanks Mike) sent me an email recently with some tips for making Delphi 2007 faster and more stable.  Here is the list of things you should do to improve your Delphi 2007 installation:

To make Delphi 2007 (or Rad Studio 2007) fast and stable, do this:

1. Install “December 2007 update”
2. Install the “April 2008 Hotfix”
3. Install the “June 2008 Hotfix for ilink32?
4. Install IDEFixPack 1.6 (or newer) – freeware from 3rd-party
5. Install DelphiSpeedup 2.78 (or newer) – freeware from 3rd-party

If you use the built-in help, then also install “May 2008 Help Update”

Both DelphiSpeedup 2.78 and IDEFixPack 1.6 are must-haves for any Delphi user.

I’ve already patched with IDEFix which has got rid of some annoying ‘features’ in the original release, including the two taskbar buttons that occasionally appear with Delphi.

The original link comes from a D2007 review:

http://excessive.wordpress.com/2007/06/12/codegear-delphi-2007-review/

Delphi

Google goes offline with Gmail

January 25th, 2009

What is Google doing with Gmail and Gears? Those guys have been busy for several years figuring out how to take the internet with them on a local hard-drive. Finally they’ve got around to doing this with their flagship ‘gmail’ application. Of course, here at Wizard Software, with Delphi and a little PHP, we’ve also been taking our internet with us; mainly on a thumb drive. In a few weeks we will be releasing our first major ‘offline capable’ portable application which has been developed for a high profile perfume and cosmetics company.  It’s a sales tool for their in-field operators who only have occasional internet access. The application we have developed functions offline and synchronises data with the server on connection to the internet. It really is the way applications are going to be used in the future and we have some great tools with Delphi, PHP, XML and of course a little encryption. Check out what Google have been doin via the link below. In a little while I’ll be uploading some sample applications written in Delphi and PHP that demonstrate the future of mobile, distributed computing.

http://www.download.com/8301-2007_4-10152019-12.html

Delphi, php , ,