TBitButton.StylusHotImageIndex is a new property in Delphi XE. -1 is the default and it will no longer pulsate. Choose an image index to pulsate to. If you want the old behavior which was a bug then add a blank image to the image list and choose that. Click here for the official documentation.
Tuesday, November 30, 2010
New Property - TBitButton.StylusHotImageIndex
Posted by
Chris Bensen
at
10:23 AM
2
comments
Labels: Delphi
Thursday, November 18, 2010
RAD Studio XE Examples on Sourceforge
New to XE is all demos on on Sourceforge.
http://sourceforge.net/projects/radstudiodemos/
You can also update any demo to the latest from within the IDE by opening the project and updating using the SVN integration.
Posted by
Chris Bensen
at
8:29 AM
0
comments
Labels: C++Builder, Delphi
Tuesday, November 9, 2010
I Picked up a Panasonic GF1
In a previous post about selling my Canon G10. Since then the Panasonic LX-5, Canon G12, Canon S95 and a few other cameras have been released (and since originally writing this the GF2). I looked at each one very carefully. All three cameras are very similar to their previous generations. The Canon's add 720p video. And it looks pretty darn good. But I still have the same issues as before:
- slow autofocus
- unusable past ISO 200
So in good light you get great photos but in mediocre to terrible light you get terrible photos. For the primary intended use of this camera, family photos, mediocre to terrible light is the norm. I was about to plunk down the cash and buy the Panasonic LX-5 and then I noticed the Panasonic GF1 has a serious price drop. Then it dropped again. So a couple weeks back I went for it and I couldn't be happier! I'll post some photos soon but the autofocus while not on par with an SLR it is really good. The image quality and low ISO while not on par with an SLR is really good too. The video is amazing. And the size of the unit while not a pants pocketable camera it can fit in a jacket or sweatshirt pocket without any problems. I've had small Elph cameras and I have never put them in my jeans pocket so I didn't consider the small size of the S95 much of a benefit. In fact, my large hands had a hard time using the S95 which is another reason I opted for the GF1.
I have a small lens case for an 85mm lens that it fits in quite comfortably. I used the same lens case for the G10. Both cameras are very similar in size except for the protruding lens. I opted for the Panasonic 20mm f/1.7 pancake lens. Someday I'll buy the Panasonic 14mm f/2.5. Probably when I do my next epic outdoor trip this Winder.
For family photos I've been carrying around the Canon 5D with the 50mm f/1.8 but the GF1 + 20mm is much much smaller. For long outdoor trips I have been using the Canon 5D with the 24-105. I think if I get the 14mm I'd be happy to carry the GF1 instead.
I do have a few complaints. The nob on the back is a little hard to rotate. The grip on it seems to be a little to rounded. And for some reason the autorotate of the images is tied to the lens and the 20mm lens doesn't have that feature.
Posted by
Chris Bensen
at
7:00 AM
0
comments
Labels: photo
Monday, November 8, 2010
Suggestion Box: Implementing Custom Gestures
"Today I try to implement custom Gesture on my application. I try to create the form that the user can customize Gesture for "Close" action at runtime, I don't know how to do this. Two week before I designed "C" gesture for "Close" action but the user want to design it himself.
Thank you.
-paracet-"
Great question. Go watch Hands-On: Gestures in the VCL by Seppy Bloom. That should answer all the questions you have about creating and using custom gestures in your applications.
Posted by
Chris Bensen
at
7:00 AM
0
comments
Labels: C++Builder, Delphi, Touch
Friday, November 5, 2010
TDirect2DCanvas Performance
A question about the performance of TDirect2DCanvas was brought to my attention on Stack Overflow the other day and I decided to answer it. Check it out here. Hopefully this solves some of the mystery around the performance issues of Direct2D. Direct2D really is cool.
Posted by
Chris Bensen
at
9:49 AM
6
comments
Labels: C++Builder, Delphi
Tuesday, October 26, 2010
Turbo Pascal 5.5 on iPhone 4
Apple just approved the DOS emulator iDOS and we were interested to see if some of the old DOS versions of Turbo Pascal from the Borland museum worked. So rotate your head 90 degrees to the right and take a look below (image screen capture straight from iPhone 4 without modification):
Everything except the debugger appears to be working. Without the debugger it'd be a little difficult to use.
Posted by
Chris Bensen
at
11:37 AM
9
comments
Labels: Delphi
Monday, October 11, 2010
Case Sensitive File System on OSX
I recently had to determine if the file system was case sensitive on OSX. It was actually throw away work but figured I'd post it to my blog in case anyone else out there needed to do the same thing and didn't want to start from scratch.
#include <CoreServices/CoreServices.h>
#include <CoreFoundation/CFString.h>
BOOL IsFileSystemCaseSensitive(const char* path)
{
FSRef ref;
FSCatalogInfo info;
GetVolParmsInfoBuffer buffer;
if ((FSPathMakeRef((const UInt8*)path, &ref, NULL) == noErr) &&
(FSGetCatalogInfo(&ref, kFSCatInfoVolume, &info, NULL, NULL, NULL) == noErr) &&
(FSGetVolumeParms(info.volume, &buffer, sizeof(buffer)) == noErr) &&
(buffer.vMVersion > 2))
{
if ((buffer.vMExtendedAttributes & (1 << bIsCaseSensitive)) != 0)
return TRUE;
}
return FALSE:
}
If the path parameter is simply an ANSI string then this function works fine. However, if it is a unicode string, then you'll need to call CFStringGetFileSystemRepresentation to get everything encoded correctly.
Posted by
Chris Bensen
at
7:00 AM
0
comments
Friday, August 13, 2010
Sneak Peek - COM Registration
The menu items Run | Register ActiveX Server and Run | Unregister ActiveX Server have been changed. There is now one menu item under the Run menu called ActiveX Server with three sub menu items:
Register
Register for Current User
Unregister
Register for Current User will do just as it says. Handy if your IDE is installed on a UAC system or you need to test in an environment that will be running under UAC. The entire COM registration system has been adapted to account for things registered for current users. This means if you register something for current user then go to import it it will show up in the list.
Another handy feature is the above menu items handle local servers. No longer do you have to set the run parameters with /regserver.
tregsvr.exe now has the parameter -s for "Register or unregister for current user".
Posted by
Chris Bensen
at
10:27 AM
4
comments
Labels: C++Builder, COM, Delphi, peek
Thursday, August 12, 2010
More Sneak Peek
Earlier today I posted a list of some of the features new to Delphi XE and C++Builder XE. One oldie by goodie feature is the Install Component wizard:
Posted by
Chris Bensen
at
2:03 PM
3
comments
Labels: C++Builder, Delphi, peek
Sneak Peeks of Delphi XE and C++Builder XE
So it's sneak peek time and there's lots to talk about. I'll post as much as I can over the next few days when I get a chance so things are probably gonna be posted sporadically like now where I'm between builds.
The first obvious thing is the name. Yeah, the name changed.
Oh, almost forgot, I'm also supposed to link to RAD Studio XE Preview and mention that I have been given permission to discuss or show new features of a pre-release version by Embarcadero Technologies.
So the features, because that's what everyone is interested in, right?
SVN version control is now integrated into the IDE. This really is more exciting that it sounds and here's why. ALL the source to it is public! If you use Tortoise or CallabNet then keep using them, just know that you can switch between them using whatever is the most useful. I still use use Tortoise and CallabNet, but I've started using the SVN IDE integration too.
Next we've got regular expressions. A lot of people are probably going to write about them.
There are a couple new RTL functions for creating symlinks that I'll talk about at a later time.
C++ had a major COM change. ATL was replaced by DAX which is pretty slick. You can still use ATL if you desire so more on this later.
COM registration now supports per user registration. I'll have a post on how this works later.
If you do COM then the Registered Type Libraries view is more useful than ever.
The DataSnap wizards have been given a huge facelift making them much easier to use.
That's all I got time for at the moment. Stay tuned for more.
Posted by
Chris Bensen
at
8:21 AM
7
comments
Labels: C++Builder, Delphi, peek
Friday, June 25, 2010
Life before Interfaces
Way way back this is how IUnknown was defined before Delphi added the interface language feature:
IUnknown = class
public
{ IUnknown }
function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall; abstract;
function _AddRef: Integer; virtual; stdcall; abstract;
function _Release: Integer; virtual; stdcall; abstract;
end;
Here's IUnknown now:
IUnknown = interface
['{00000000-0000-0000-C000-000000000046}']
function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
end;
There are so many advantages it's hard to list them all and now we just take them for granted, but here are a few advantages:
- implement multiple interfaces on the same object
- compiler support for lifetime management
- assign an interface to a GUID
Posted by
Chris Bensen
at
7:00 AM
12
comments
Wednesday, June 23, 2010
Eyjafjallajökull Photograph

Lightning streaks across the sky as lava flows from a volcano in Eyjafjallajökull April 17, 2010. Copyright REUTERS/Lucas Jackson
Some amazing photographs have come from the Eyjafjallajökull volcano. The photograph above is one of my favorites so far.
Freezing the volcano’s lightning is the story behind the photograph.
Update: This photograph happens to be in this months National Geographic
Posted by
Chris Bensen
at
7:00 AM
0
comments
