The Road to Delphi – a Blog about programming

Delphi – Free Pascal – Oxygene


Leave a comment

Delphi 2010 Help Update 1 released

Embarcadero has released the Delphi 2010 Help Update 1. you can find more info here.

Improvements in Help Update 1

In the VCL:

  • Documentation has been completed for the StdConvs unit.
  • Documentation has been completed for the GestureMgr unit, which was new in the RTM release.
  • Documentation has been added for the following new units:
  • Documentation has been added for many of the DataSnap APIs. See the DSConnect, DSHTTP, DSProd, and DSServer units.
  • New resurfaced intrinsic ROUTINES are documented.
  • The documentation team has fixed approximately 25 bugs reported on customer forums and in direct customer feedback.

In the IDE topics:

  • The documentation team has fixed approximately 20 bugs reported in QC, RAID, or direct customer feedback.
  • The View > History command is now documented.


Leave a comment

ShineOn 1.0.1.0 released

ShineOn is a  library to assist porting Delphi/Win32 and Delphi for .NET projects to Delphi Prism by providing a subset of RTL and core VCL classes that can be used instead of replacing all RTL/VCL calls with native FCL alternatives.

ShineOn is an open source effort, More information can be found in the Prism Wiki, here.

You can download ShineOn from Here

Bye.


1 Comment

Blaise Pascal Magazine #8 is available now

A new edition of Blaise Pascal Magazine is available


  • Delphi 2010 – what a feeling! – Bob Swart page 7 -  Gestures could be the new ’must’ in our computers future
  • Counters – David Dirkse page 11 – Learning counting again, – could wel be a hobby…
  • Virus in Delphi? – Nick Hodges page 14 – Nick explains how to get rid of the virus and block it.
  • Dezign for databases – Marco Roessen page 16 - A fantastic alternative for its expensive competitors, and it’s even cheaper.
  • Changing the looks of T-Field – Henk Schreij page 18 – Diving deeper into the possibility’s
  • Using Free Pascal and Lazarus to create applications for OSX – Jeremy North page 20 – Working on the Mac is hot
  • Writing Delphi Components II: Custom Properties  and Windows Controls – Marco Cantù page 22 – In the new Delphi versions it looks all different.
  • My Top Five Delphi 2010
  • New Features – Pawel Glowacki page 24 - Except for guestures ther is a lot of news…
  • Fast Graphic deformation by using Scanlines – Peter Bijlsma page 28
  • Control your own image or blow it up! Berlusconi on the edge
  • Wide Information Bus (Introduction) – Fikret Hasovic page 33 -   What is it and what the use for it?
  • Freehand Drawing (Introduction) – David Dirkse page 36 - shows how to create your own paint program


2 Comments

Detect Aero Glass using Delphi

To detect if Aero Glass is enabled we must use the DwmIsCompositionEnabled function.

See this example

program DetectAeroDelphi;
{$APPTYPE CONSOLE}
//Author Rodrigo Ruz 2009-10-26
uses
  Windows,
  SysUtils;

function  ISAeroEnabled: Boolean;
type
  _DwmIsCompositionEnabledFunc = function(var IsEnabled: Boolean): HRESULT; stdcall;
var
  Flag                       : Boolean;
  DllHandle                  : THandle;
  OsVersion                  : TOSVersionInfo;
  DwmIsCompositionEnabledFunc: _DwmIsCompositionEnabledFunc;
begin
  Result:=False;
  ZeroMemory(@OsVersion, SizeOf(OsVersion));
  OsVersion.dwOSVersionInfoSize := SizeOf(TOSVERSIONINFO);

  if ((GetVersionEx(OsVersion)) and (OsVersion.dwPlatformId = VER_PLATFORM_WIN32_NT) and (OsVersion.dwMajorVersion >= 6)) then //is Vista or Win7?
  begin
    DllHandle := LoadLibrary('dwmapi.dll');
    try
      if DllHandle <> 0 then
      begin
        @DwmIsCompositionEnabledFunc := GetProcAddress(DllHandle, 'DwmIsCompositionEnabled');
        if (@DwmIsCompositionEnabledFunc <> nil) then
        begin
          if DwmIsCompositionEnabledFunc(Flag)= S_OK then
           Result:=Flag;
        end;
      end;
    finally
      if DllHandle <> 0 then
        FreeLibrary(DllHandle);
    end;
  end;
end;

begin
  try
    if ISAeroEnabled then
     Writeln('Aero Glass enabled')
    else
     Writeln('Aero Glass disabled');
  except
    on E:Exception do
      Writeln(E.Classname, ': ', E.Message);
  end;
    Readln;
end.


1 Comment

Glass effect in a Delphi Console Application

Using the DwmEnableBlurBehindWindow and  GetConsoleWindow functions , we  can  apply a nice glass effect to our console applications.

Check this sample application

program ConsoleGlassDelphi;
//Author  : Rodrigo Ruz 2009-10-26
{$APPTYPE CONSOLE}

uses
  Windows,
  SysUtils;

type
  DWM_BLURBEHIND = record
    dwFlags                 : DWORD;
    fEnable                 : BOOL;
    hRgnBlur                : HRGN;
    fTransitionOnMaximized  : BOOL;
  end;

//function to enable the glass effect
function DwmEnableBlurBehindWindow(hWnd : HWND; const pBlurBehind : DWM_BLURBEHIND) : HRESULT; stdcall; external  'dwmapi.dll' name 'DwmEnableBlurBehindWindow';
//get the handle of the console window
function GetConsoleWindow: HWND; stdcall; external kernel32 name 'GetConsoleWindow';

function DWM_EnableBlurBehind(hwnd : HWND; AEnable: Boolean; hRgnBlur : HRGN = 0; ATransitionOnMaximized: Boolean = False; AFlags: Cardinal = 1): HRESULT;
var
  pBlurBehind : DWM_BLURBEHIND;
begin
  pBlurBehind.dwFlags:=AFlags;
  pBlurBehind.fEnable:=AEnable;
  pBlurBehind.hRgnBlur:=hRgnBlur;
  pBlurBehind.fTransitionOnMaximized:=ATransitionOnMaximized;
  Result:=DwmEnableBlurBehindWindow(hwnd, pBlurBehind);
end;

begin
  try
    DWM_EnableBlurBehind(GetConsoleWindow(), True);
    Writeln('See my glass effect');
    Writeln('Go Delphi Go');
    Readln;
  except
    on E:Exception do
      Writeln(E.Classname, ': ', E.Message);
  end;
end.

And this is the result
glass console


Leave a comment

The official Delphi 2010 Survey

Help  to improve Delphi answering this survey.

All,

First, I want to thank you for all of your support in the past, present, and
future. Below is the link to the 2010 Delphi survey, this is conducted by
Embarcadero and the Product Management for the Delphi product. The
responses are extremely important to us and help to shape the vision and
future of the product.

I know the survey is long, very LONG! But again, the information we get
from the answers you give are needed more than ever.

Please pass this survey on to anybody you think would be interested in
filling it out.

Again, thanks!

Mike

Mike Rozlog
Product Manager – Delphi


Leave a comment

Embarcadero launch Windows 7 Developer Center

If you are interested in resources for building Windows 7 aplications Embarcadero has launched the Windows 7 Developer Center.

More resources for Delphi 2010  and Windows 7

  • RAD Studio 2010 – Gestures and Multi-Touch
  • RAD Studio 2010 -Touch & Gestures Part 1
  • RAD Studio 2010 -Touch & Gestures Part 2
  • Touch Hardware
  • RAD Studio 2010 – Touch Keyboard
  • Follow

    Get every new post delivered to your Inbox.

    Join 652 other followers