Posts

Yahoo Messenger Robot

Free Yahoo Robot Messenger is auto response Yahoo Mess program. Message Response taking from database. This program is free using Bricksoft IM(MSN,YAHOO,AIM) VCL Component(Unregistered Version). for download program please klik http://www.2shared.com/file/3035373/be70d67c/ymrobot.html http://www.2shared.com/fadmin/3035373/8c972f85/ymrobot.zip

Shape a form to a bitmap

{ Fill bitmap to Form } unit Unit1; interface uses Windows, Classes, SysUtils, Graphics, Forms; type TRGBArray = array [0..32767] of TRGBTriple; PRGBArray = ^TRGBArray; type TForm1 = class (TForm) procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private { Private declarations } FRegion: THandle; function CreateRegion(Bmp: TBitmap): THandle; end ; var Form1: TForm1; implementation {$R *.dfm} function TForm1.CreateRegion(Bmp: TBitmap): THandle; var X, Y, StartX: Integer; Excl: THandle; Row: PRGBArray; TransparentColor: TRGBTriple; begin Bmp.PixelFormat := pf24Bit; Result := CreateRectRGN(0, 0, Bmp.Width, Bmp.Height); for Y := 0 to Bmp.Height - 1 do begin Row := Bmp.Scanline[Y]; StartX := -1; if Y = 0 then TransparentColor := Row[0]; for X := 0 to Bmp.Width - 1 do begin if (Row[X].rgbtRed = TransparentColor.rgbtRed) and (Row[X].rgbtGreen = TransparentColor.rgbtGreen) and

Making the Enter Key act like Tab (Delphi Tips)

{ Delphi Tips This code gives the key the same habbit as the key to change focus between Controls. } // Form1.KeyPreview := True ! procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then begin Key := #0; { check if SHIFT - Key is pressed } if GetKeyState(VK_Shift) and $8000 <> 0 then PostMessage(Handle, WM_NEXTDLGCTL, 1, 0) else PostMessage(Handle, WM_NEXTDLGCTL, 0, 0); end ; end ; swissdelphicenter.ch

know if the form is modal

procedure TForm1.Button1Click(Sender: TObject); begin if (fsModal in FormState) then ShowMessage('Form is modal.'); end ; swissdelphicenter.ch

Execute the Windows Explorer Find File Dialog Box

The following example demonstrates using DDE to execute Explorer's find file dialog. The example opens the dialog in the Directory "C:\DelphiTips". ~~~~~~~~~~~~~~~~~~~~~~~~~ uses ddeman; procedure TForm1.Button1Click(Sender: TObject) ; begin with TDDEClientConv.Create(Self) do begin ConnectMode := ddeManual; ServiceApplication := 'explorer.exe'; SetLink( 'Folders', 'AppProperties') ; OpenLink; ExecuteMacro ('[FindFolder(, C:\DelphiTips)]', False) ; CloseLink; Free; end; end; About.com

Making a transparent form

Add a Button (Button1) to a Delphi form (Form1) procedure TForm1.FormCreate(Sender: TObject) ; var FullRgn, ClientRgn, ButtonRgn: THandle; Margin, X, Y: Integer; begin Margin := (Width - ClientWidth) div 2; FullRgn := CreateRectRgn(0, 0, Width, Height) ; X := Margin; Y := Height - ClientHeight - Margin; ClientRgn := CreateRectRgn (X, Y, X + ClientWidth, Y + ClientHeight) ; CombineRgn(FullRgn, FullRgn, ClientRgn, RGN_DIFF) ; X := X + Button1.Left; Y := Y + Button1.Top; ButtonRgn := CreateRectRgn (X, Y, X + Button1.Width, Y + Button1.Height) ; CombineRgn(FullRgn, FullRgn, ButtonRgn, RGN_OR) ; SetWindowRgn(Handle, FullRgn, True) ; end; from: about.com