Cygnes' Weblog

Tuesday, December 11, 2007

Vista Network File Copying

I'm using CruiseControl.net for my auto build environment. One part of the build is copying my release to a network server. The bad part about this is that my build is taking ages, just because of the slow Vista file copying. 2 MB file is taking more than 2 minutes to copy. Copying is taking more time than building the whole project. So I really needed a faster method to copy my files. I tried RoboCopy, copy and xcopy. They are all slow, so I decided to write a simple delphi console application that copies a file to a destination path. Guess what, instead of 2 minutes it takes less than 2 seconds, so beat this Vista. All I used is a TFileStream for input and a TFileStream from output. Geez, that's all it took.

Go Delphi! You made my day, again!

Labels: , , , , , ,

Thursday, December 6, 2007

My employer is looking for Delphi and C# developers

Hey developers,

looking for a developer job in Belgium. Good news! my employer has some job offerings.

More info about the job can be found here:

www.vacature.com (dutch)

For more information you can contact Tom De Decker at Aucxis trading Solutions

Maybe we'll be colleagues in the near future.

Labels: , , , , , , , , ,

Friday, April 27, 2007

Editing HTML with TWebBrowser

Coltrui asked me if I knew any good HTML editors that can be used in a delphi application. I don't know any free components for Delphi for WYSIWYG editing. But I know the TWebBrowser has an edit mode.

So now it's time to get started on html editing with TWebBrowser. A few steps to get started:

1) add a TWebBrowser control to your application

2) open a webpage or an empty page.

ie. WebBrowser1.navigate('http://zinloos.be/wordpress');
WebBrowser1.navigate('about:blank');


3) Put TWebBrowser in edit mode.

(WebBrowser1.Document as IHTMLDocument2).DesignMode := 'On';

4) Start editing!

5) Save HTML to file

var
persist: IPersistFile;
begin
Persist := (WebBrowser1.Document as IPersistFile);
Persist.Save(StringToOleStr(ExtractFilePath(application.exename) +
'test.html'), True);
end;


These are some basics without special features. But you can select a part of the html text and press CTRL+B for BOLD, CTRL+I for ITALIC, CTRL+U for UNDERLINE.

Even creating a link with CTRL+K works great.

Labels: , , , ,

Thursday, April 12, 2007

Open Tools Api

Jeremy North wrote an article about extending the project manager context menu. It's great to see more attention to the open tools. He hopes to write more than one article. So I sure have to keep an eye on his articles. Very interesting indeed.

Labels: , , ,

Wednesday, April 11, 2007

Execute Delphi code from javascript using TWebbrowser

I just bumped into some really neat code. This code allows you to integrate your delphi application with the TWebBrowser component. You just hook in your application as the host of the TWebBrowser component. This will allow javascript to use your Delphi functions. It's like the welcome page in the Delphi IDE.

Just check out this link on www.delphidabbler.com

Labels: , , , , , , , ,

Tuesday, April 10, 2007

Let's get started

Okay,

The weblog will be focussed on Object Pascal (also known as Delphi), but CodeGear is now refering back to Object Pascal as a language and Delphi as the tool to build the applications.

My current environments are:

at home - Turbo Delphi Explorer
at work - Delphi 5, Delphi 7 and soon Turbo Delphi Pro and Delphi 2007.

So far my first post, more information about myself will soon be online..but I have to get started somewhere.

Labels: , , , , , ,