Programlama yapalım ve Öğrenelim. - Delphi Eğitim18
  Ana Sayfa
  .NET Eğitim Notları
  Visual C# .NET Örnek Kodları
  VisualBasic.NET Örnek Kodları
  J# Örnekleri
  ASP.NET Örnek Kodları
  Delphi Eğitim
  => Delphi Eğitim1
  => Delphi Eğitim2
  => Delphi Eğitim3
  => Delphi Eğitim4
  => Delphi Eğitim5
  => Delphi Eğitim6
  => Delphi Eğitim7
  => Delphi Eğitim8
  => Delphi Eğitim9
  => Delphi Eğitim10
  => Delphi Eğitim11
  => Delphi Eğitim13
  => Delphi Eğitim14
  => Delphi Eğitim15
  => Delphi Eğitim16
  => Delphi Eğitim17
  => Delphi Eğitim18
  => Delphi Eğitim19
  => Delphi Eğitim20
  => Delphi Eğitim21
  => Delphi Eğitim22
  => Delphi Eğitim23
  => Delphi Eğitim24
  => Delphi Eğitim25
  => Delphi Eğitim26
  => Delphi Eğitim27
  => Delphi Eğitim28
  => Delphi Eğitim29
  => Delphi Eğitim30
  => Delphi Eğtim31
  => Delphi Eğitim32
  => Delphi Eğitim33
  => Delphi Eğitim34
  => Delphi Eğitim35
  => Delphi Eğitim36
  => Delphi Eğitim37
  => Delphi Eğitim38
  => Delphi Eğitim39
  => Delphi Eğitim40
  => Delphi Eğitim41
  => Delphi Eğitim42
  => Delphi Eğitim43
  => Delphi Eğitim44
  => Delphi Eğitim45
  => Delphi Eğitim46
  => Delphi Eğitim47
  => Delphi Eğitim48
  => Delphi Eğitim49
  => Delphi Eğitim50
  => Delphi Eğitim51
  => Delphi Eğitim52
  => Delphi Eğitim53
  => Delphi Eğitim54
  => Delphi Eğitim55
  => Delphi Eğitim56
  => Delphi Eğitim57
  => Delphi Eğitim58
  => Delphi Eğitim59
  => Delphi Eğitim60
  => Delphi Eğitim61
  => Delphi Eğitim62
  => Delphi Eğitim63
  => Delphi Eğitim64
  => Delphi Eğitim65
  => Delphi Eğitim66
  => Delphi Eğitim67
  => Delphi Eğitim68
  => Delphi Eğitim69
  => Delphi Eğitim70
  => Delphi Eğitim71
  => Delphi Eğitim72
  => Delphi Eğitim73
  => Delphi Eğitim74
  => Delphi Eğitim75
  => Delphi Eğitim76
  => Delphi Eğitim77
  => Delphi Eğitim78
  => Delphi Eğitim79
  => Delphi Eğitim80
  => Delphi Eğitim81
  => Delphi Eğitim82
  => Delphi Eğitim83
  => Delphi Eğitim84
  => Delphi Eğitim85
  => Delphi Eğitim86
  => Delphi Eğitim87
  => Delphi Eğitim88
  => Delphi Eğitim89
  => Delphi Eğitim90
  => Delphi Eğitim91
  => Delphi Eğitim92
  => Delphi Eğitim93
  => Delphi Eğitim94
  => Delphi Eğitim95
  => Delphi Eğitim96
  => Delphi Eğitim97
  => Delphi Eğitim98
  => Delphi Eğitim99
  => Delphi Eğitim100
  => Delphi Eğitim101
  => Delphi Eğitim102
  => Delphi Eğitim103
  => Delphi Eğitim104
  => Delphi Eğitim105
  => Delphi Eğitim106
  => Delphi Eğitim107
  => Delphi Eğitim108
  => Delphi Eğitim109
  => Delphi Eğitim110
  => Delphi Eğitim111
  => Delphi Eğitim112
  => Delphi Eğitim113
  => Delphi Eğitim114
  => Delphi Eğitim115
  => Delphi Eğitim116
  => Delphi Eğitim117
  => Delphi Eğitim118
  => Delphi Eğitim119
  => Delphi Eğitim120
  => Delphi Eğitim121
  => Delphi Eğitim122
  => Delphi Eğitim123
  => Delphi Eğitim124
  => Delphi Eğitim125
  => Delphi Eğitim126
  => Delphi Eğitim127
  => Delphi Eğitim128
  => Delphi Eğitim129
  => Delphi Eğitim130
  => Delphi Eğitim131
  => Delphi Eğitim132
  => Delphi Eğitim133
  => Delphi Eğitim134
  => Delphi Eğitim135
  => Delphi Eğitim136
  => Delphi Eğitim137
  => Delphi Eğitim138
  => Delphi Eğitim139
  => Delphi Eğitim140
  => Delphi Eğitim141
  => Delphi Eğitim142
  => Delphi Eğitim143
  => Delphi Eğitim144
  => Delphi Eğitim145
  => Delphi Eğitim146
  => Delphi eğitim147
  => Delphi Eğitim148
  => Delphi Eğitim149
  => Delphi Eğitim150
  => Delphi Eğitim151
  => Delphi Eğitim152
  => Delphi Eğitim153
  => Delphi Eğitim154
  => Delphi Eğitim155
  => Delphi Eğitim156
  => Delphi Eğitim157
  => Delphi Eğitim158
  => Delphi Eğitim159
  => Delphi Eğitim160
  => Delphi Eğitim161
  => Delphi Eğitim162
  => Delphi Eğitim164
  => Delphi Eğitim165
  => Delphi Eğitim166
  => Delphi Eğitim167
  => Delphi Eğitim168
  => Delphi Eğitim169
  => Delphi Eğitim170
  => Delphi Eğitim171
  => Delphi Eğitim172
  => Delphi Eğitim173
  => Delphi Eğitim174
  => Delphi Eğitim175
  => Delphi Eğitim176
  => Delphi Eğitim177
  => Delphi Eğitim178
  => Delphi Eğitim179
  => Delphi Eğitim180
  => Delphi Eğitim181
  => Delphi Eğitim182
  => Delphi Eğitim183
  => Delphi Eğitim184
  => Delphi Eğitim185
  => Delphi Eğitim186
  => Delphi Eğitim187
  => Delphi Eğitim188
  => Delphi Eğitim189
  => Delphi Eğitim190
  => Delphi Eğitim191
  => Delphi Eğitim192
  => Delphi Eğitim193
  => Delphi Eğitim194
  => Delphi Eğitim195
  => Delphi Eğitim196
  => Delphi Eğitim197
  => Delphi Eğitim198
  => Delphi Eğitim199
  => Delphi Eğitim200
  => Delphi Eğitim201
  => Delphi Eğitim202
  => Delphi Eğitim203
  => Delphi Eğitim204
  => Delphi Eğitim205
  => Delphi Eğitim206
  => Delphi Eğitim207
  => Delphi Eğitim208
  => Delphi Eğitim209
  => Delphi Eğitim210
  => Delphi Eğitim211
  => Delphi Eğitim212
  => Delphi Eğitim213
  => Delphi Eğitim214
  => Delphi Eğitim215
  => Delphi Eğitim216
  => Delphi Eğitim217
  => Delphi Eğitim218
  => Delphi Eğitim219
  => Delphi Eğitim220
  => Delphi Eğitim221
  => Delphi Eğitim222
  => Delphi Eğitim223
  => Delphi Eğitim224
  => Delphi Eğitim225
  => Delphi Eğitim226
  => Delphi Eğitim227
  => Delphi Eğitim228
  => Delphi Eğitim229
  => Delphi Eğitim230
  => Delphi Eğitim231
  => Delphi Eğitim232
  => Delphi Eğitim233
  => Delphi Eğitim234
  => Delphi Eğitim235
  => Delphi Eğitim236
  => Delphi Eğitim237
  => Delphi Eğitim238
  => Delphi Eğitim239
  => Delphi Eğitim240
  => Delphi Eğitim241
  => Delphi Eğitim242
  İletişim

Form ve Pencere işlemleri

Bu bölümde, Delphi uygulamaları içerisinde gerekebilecek form ve pencere işlemleri ile ilgili Püf noktaları ve kod örnekleri yer almaktadır.

Masa üstündeki ikonların saklanması

Aşağıdaki program çalıştırıldığında, görev çubuğu üzerindeki uyarı bölümünde bir ikon olarak görünür. Bu ikon üzerinde tıklandığında desktop üzerindeki ikonlar saklanır, bir kez daha basıldığında ise geri gelir.

program DeskPop;

 

uses

    Windows, Messages, ShellAPI, sysutils;

 

{$R *.RES}

 

const

    AppName = 'DeskTop Sakla';

 

var

    x: integer;

    tid: TNotifyIconData;

    WndClass: array[0..50] of char;

 

procedure Panic (szMessage: PChar);

begin

    if szMessage <> Nil then

    MessageBox (0, szMessage, AppName, mb_ok);

    Halt (0);

end;

 

procedure HandleCommand (Wnd: hWnd; Cmd: Word);

begin

case Cmd of

Ord ('A'): MessageBox (0, 'Merhaba', AppName, mb_ok);

Ord ('E'): PostMessage (Wnd, wm_Close, 0, 0);

end;

end;

 

function DummyWindowProc (Wnd: hWnd; Msg, wParam: Word; lParam: LongInt): LongInt; stdcall;

var

    TrayHandle: THandle;

    dc: hDC;

    i: Integer;

    pm: HMenu;

    pt: TPoint;

begin

DummyWindowProc := 0;

StrPCopy(@WndClass[0], 'Progman');

TrayHandle := FindWindow(@WndClass[0], nil);

case Msg of

wm_Create:

begin

     tid.cbSize           := sizeof (tid);

     tid.Wnd              := Wnd;

     tid.uID              := 1;

     tid.uFlags           := nif_Message or nif_Icon or nif_Tip;

     tid.uCallBackMessage := wm_User;

     tid.hIcon            := LoadIcon (hInstance, 'MAINICON');

     lstrcpy (tid.szTip,'Desktop is on');

     Shell_NotifyIcon (nim_Add, @tid);

end;

wm_Destroy:

begin

     Shell_NotifyIcon (nim_Delete, @tid);

     PostQuitMessage (0);

     ShowWindow(TrayHandle, SW_RESTORE);

end;

wm_Command:

begin

     HandleCommand (Wnd, LoWord (wParam));

     Exit;

end;

wm_User:        // Had a tray notification - see what to do

if (lParam = wm_LButtonDown) then

begin

if x = 0 then

begin

ShowWindow(TrayHandle, SW_HIDE);

//tid.hIcon := LoadIcon (hInstance, 'offICON');

lstrcpy (tid.szTip,'Desktop Kapalı');

Shell_NotifyIcon (NIM_MODIFY, @tid);

x:=1

end else

begin

ShowWindow(TrayHandle, SW_RESTORE);

//tid.hIcon := LoadIcon (hInstance, 'ONICON');

lstrcpy (tid.szTip,'Desktop Açık');

Shell_NotifyIcon (NIM_MODIFY, @tid);

x:= 0;

end;

end else

if  (lParam = wm_RButtonDown) then

begin

GetCursorPos (pt);

pm := CreatePopupMenu;

AppendMenu (pm, 0, Ord ('A'), 'Hakkında...');

AppendMenu (pm, mf_Separator, 0, Nil);

AppendMenu (pm, 0, Ord ('E'), 'Kapat');

SetForegroundWindow (Wnd);

dc := GetDC (0);

if TrackPopupMenu (pm, tpm_BottomAlign or tpm_RightAlign, pt.x,GetDeviceCaps(dc,HORZRES){pt.y}, 0, Wnd, Nil) then

                 SetForegroundWindow (Wnd);

                 DestroyMenu (pm)

end;

end;

 

DummyWindowProc := DefWindowProc (Wnd, Msg, wParam, lParam);

end;

 

procedure WinMain;

var

    Wnd: hWnd;

    Msg: TMsg;

    cls: TWndClass;

begin

    { Previous instance running ?  If so, exit }

    if FindWindow (AppName, Nil) <> 0 then exit;

    //Panic (AppName + ' is already running.');

 

    {  window Sınıfını kaydettir }

    FillChar (cls, sizeof (cls), 0);

    cls.lpfnWndProc := @DummyWindowProc;

    cls.hInstance := hInstance;

    cls.lpszClassName := AppName;

    RegisterClass (cls);

 

    { Boş pencereyi yarat }

    Wnd := CreateWindow (AppName, AppName, ws_OverlappedWindow,

                         cw_UseDefault, cw_UseDefault, cw_UseDefault, cw_UseDefault,

                         0, 0, hInstance, Nil);

    x:= 0;

    if Wnd <> 0 then

    begin

        ShowWindow (Wnd, sw_Hide);

        while GetMessage (Msg, 0, 0, 0) do

        begin

            TranslateMessage (Msg);

            DispatchMessage (Msg);

        end;

    end;

end;

 

begin

    WinMain;

end.

Bütün açık pencerelerin listelenmesi

Sistemde açık olan bütün pencerelerin listelenmesi için, EnumWindows fonksiyonu kullanılır.

function EnumWindowsProc(Wnd : HWnd;Form : TForm1) : Boolean; Export; {$ifdef Win32} StdCall; {$endif}

var

Buffer : Array[0..99] of char;

begin

GetWindowText(Wnd,Buffer,100);

if StrLen(Buffer) <> 0 then

Form.ListBox1.Items.Add(StrPas(Buffer));

Result := True;

end;

 

procedure TForm1.Button1Click(Sender: TObject);

begin

EnumWindows(@EnumWindowsProc,LongInt(Self));

end;

Farklı bir pencere

Standart Windows pencereleri, dikdörtgen veya kare şeklindedir. Değişik şekilli bir pencere yaratmak için;

var

hR : THandle;

begin

hR := CreateEllipticRgn(0,0,100,200);

SetWindowRgn(Handle,hR,True);

end;

Farklı pencereye bir başka örnek;

unit Unit1;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  ExtCtrls, Buttons;

type

  TForm1 = class(TForm)

    SpeedButton1: TSpeedButton;

    Image1: TImage;

    procedure FormCreate(Sender: TObject);

    procedure SpeedButton1Click(Sender: TObject);

  private

    { Private declarations }

      procedure CreateParams(var Params: TCreateParams); override;

  public

    { Public declarations }

  end;

var

  Form1: TForm1;

implementation

procedure TForm1.CreateParams(var Params: TCreateParams);

begin

inherited createparams(params);

params.style:=params.style or ws_popup xor ws_dlgframe;

end;

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);

var

formrgn:hrgn;

begin

form1.brush.style:=bsclear;

GetWindowRgn(form1.Handle, formRgn);

  DeleteObject(formRgn);

   formrgn:=

    CreateroundRectRgn(0,

0,form1.width,form1.height,form1.width,form1.height);

   SetWindowRgn(form1.Handle, formrgn, TRUE);

end;

procedure TForm1.SpeedButton1Click(Sender: TObject);

begin

form1.close;

end;

end.

Üzerine bırakılan dosyalara duyarlı form

unit dragfile;

 

interface

 

uses

  Windows, Messages, SysUtils, Classes,

  Graphics, Controls, Forms, Dialogs;

type

  TForm2 = class(TForm)

    procedure FormCreate(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

 

    procedure AcceptFiles( var msg : TMessage );

      message WM_DROPFILES;

  end;

 

var

  Form2: TForm2;

 

implementation

 

uses

  ShellAPI;

 

{$R *.DFM}

 

procedure TForm2.AcceptFiles( var msg : TMessage );

const

  cnMaxFileNameLen = 255;

var

  i,

  nCount     : integer;

  acFileName : array [0..cnMaxFileNameLen] of char;

begin

  nCount := DragQueryFile( msg.WParam,

                           $FFFFFFFF,

                           acFileName,

                           cnMaxFileNameLen );

 

  for i := 0 to nCount-1 do

  begin

    DragQueryFile( msg.WParam, i,

                   acFileName, cnMaxFileNameLen );

 

    MessageBox( Handle, acFileName, '', MB_OK );

  end;

 

  DragFinish( msg.WParam );

end;

 

procedure TForm2.FormCreate(Sender: TObject);

begin

DragAcceptFiles( Handle, True );

end;

 

end.

Form başlığının saklanması

procedure TForm1.Createparams(var Params: TCreateParams);

   begin

        inherited CreateParams(Params);

        with Params do

           Style := (Style or WS_POPUP) and (not WS_DLGFRAME);

   end;

Standart dışı formlar

Windows'un standart formlarından sıkılanlar için, farklı bir form.

 

unit Unit1;

 

interface

 

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  ExtCtrls, StdCtrls;

 

type

  TForm1 = class(TForm)

    Button1: TButton;

    Panel1: TPanel;

    Panel2: TPanel;

    Panel3: TPanel;

    Panel4: TPanel;

    Panel5: TPanel;

        procedure FormResize(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;

 

var

  Form1: TForm1;

 

implementation

 

{$R *.DFM}

 

procedure TForm1.FormResize(Sender: TObject);

var

  WindowRgn, HoleRgn : HRgn;

begin

  WindowRgn := 0;

  GetWindowRgn(Handle, WindowRgn);

  DeleteObject(WindowRgn);

  WindowRgn :=

    CreateRectRgn(0,0,Width,Height);

  HoleRgn :=

    CreateRectRgn(Panel3.Width + 6,

             Panel1.Height + 25,

             Width - (Panel4.Width + 6),

             Height - (Panel2.Height + 6));

  CombineRgn(WindowRgn, WindowRgn,

             HoleRgn, RGN_DIFF);

  SetWindowRgn(Handle, WindowRgn, TRUE);

  DeleteObject(HoleRgn);

end;

 

end.

 

object Form1: TForm1

  Left = 216

  Top = 178

  AutoScroll = False

  Caption = 'Form1'

  ClientHeight = 453

  ClientWidth = 688

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  OnResize = FormResize

  PixelsPerInch = 96

  TextHeight = 13

  object Button1: TButton

    Left = 512

    Top = 352

    Width = 75

    Height = 25

    Caption = 'Button1'

    TabOrder = 0

  end

  object Panel1: TPanel

    Left = 0

    Top = 0

    Width = 688

    Height = 5

    Align = alTop

    BevelOuter = bvNone

    Color = clRed

    TabOrder = 1

  end

  object Panel2: TPanel

    Left = 0

    Top = 443

    Width = 688

    Height = 10

    Align = alBottom

    BevelOuter = bvNone

    Color = clRed

    TabOrder = 2

  end

  object Panel3: TPanel

    Left = 0

    Top = 5

    Width = 10

    Height = 438

    Align = alLeft

    BevelOuter = bvNone

    Color = clRed

    TabOrder = 3

  end

  object Panel4: TPanel

    Left = 678

    Top = 5

    Width = 10

    Height = 438

    Align = alRight

    BevelOuter = bvNone

    Color = clRed

    TabOrder = 4

  end

  object Panel5: TPanel

    Left = 10

    Top = 5

    Width = 668

    Height = 438

    Align = alClient

    BevelOuter = bvLowered

    Caption = 'Panel5'

    TabOrder = 5

  end

end

Form pozüsyonu

Unit1.pas

unit Unit1;

 

interface

 

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  StdCtrls;

 

type

  TForm1 = class(TForm)

  private

    { Private declarations }

  public

    { Public declarations }

Procedure WMMove(Var Message : TWMMove); message WM_Move;

  end;

 

var

  Form1: TForm1;

 

implementation

 

{$R *.DFM}

 

Procedure TForm1.WMMove(Var Message : TWMMove);

begin

  Caption := 'X = '+IntToStr(Message.XPos)+', Y = '+IntTOStr(Message.

  YPos);

end;

end.

Ekran Çözünürlüğü

Tasarım ortamın gayet düzgün görünen bir formun başka bir bilgisayarda bozuk görünmesi oldukça can sıkıcıdır. Bu olayın sebebi faklı ekran çözünürlükleri ve yazı tipi ayarıdır. Bunu önlemek için uygulama içerisinde bazı kontroller yapmak gerekir.

Aşağıdaki kod örneğinde form ve üzerindeki kontrollerin sistemdeki ayarlara göre yeniden ölçeklenmesi gösterilmektedir.

implementation

const

{formlarımızın 800x600 ölçülerinde olmasını istiyorsak…}

 ScreenWidth: LongInt = 800;

 ScreenHeight: LongInt = 600;

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);

begin

  scaled := true;

  if (screen.width <> ScreenWidth) then

  begin

    height:=longint(height)*longint(screen.height)DIV

ScreenHeight;

    width := longint(width) * longint(screen.width) DIV ScreenWidth;

    scaleBy(screen.width, ScreenWidth);

  end;

end;

Bu işlemden sonra kontrollerdeki yazı tiplerinin de ölçeklenmesi gerekecektir. Bu işlem bir döngü içerisinde kolaylıkla yapılır. Fakat bu esnada ilgili bileşenin FONT özelliği bulunduğundan emin olunmalıdır. Bu kontrol için RTTI (Run Time Type Information) kullanılabilir.

USES typinfo;

var

  i: integer;

begin

  for i := componentCount - 1 downto 0 do

    with components[i] do

    begin

      if GetPropInfo(ClassInfo, 'font') <> nil  then

        font.size := (NewFormWidth DIV OldFormWidth) * font.size;

    end;

end;

Form başlık alanı üzerinde saat gösterilmesi

Formun Caption özelliğine dokunmadan, başlık alanı üzerinde saat bilgisi gösterimi şu şekilde olur.

unit Unit1;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  ExtCtrls;

type

  TForm1 = class(TForm)

    Timer1: TTimer;

    procedure FormCreate(Sender: TObject);

    procedure FormClose(Sender: TObject; var Action: TCloseAction);

    procedure Timer1Timer(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;

 

var

  Form1: TForm1;

  dc:hdc;

 

implementation

 

{$R *.DFM}

 

procedure TForm1.FormCreate(Sender: TObject);

begin

  dc:=getwindowdc(handle);

end;

 

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);

begin

releasedc(handle,dc);

end;

 

procedure TForm1.Timer1Timer(Sender: TObject);

var

thetime: array[0..80] of char;

begin

     strpcopy(Thetime,timetostr(time));

     canvas.font.color:=clred;

     textout(dc,width div 2,5,thetime,strlen(thetime));

end;

 

end.

Form başlığının gizlenmesi

Form başlıkları, çalışma esnasında gizlenip tekrar gösterilebilir.

unit Unit1;

 

interface

 

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  StdCtrls;

 

type

  TForm1 = class(TForm)

    Button1: TButton;

    Button2: TButton;

    procedure Button1Click(Sender: TObject);

    procedure Button2Click(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

    procedure sakla;

    procedure goster;

 

  end;

 

var

  Form1: TForm1;

 

implementation

 

{$R *.DFM}

procedure tform1.sakla;

var

save:longint;

begin

     if borderstyle=bsnone then exit;

     save:=getwindowlong(handle,gwl_style);

     if (save and ws_caption)=ws_caption then

     begin

     case borderstyle of

     bssingle,bssizeable: setwindowlong(handle,gwl_style,save and (not(ws_caption)) or ws_border);

     bsdialog:setwindowlong(handle,gwl_style,save and (not(ws_caption)) or ds_modalframe or ws_dlgframe);

     end;

     height:=height-getsystemmetrics(sm_cycaption);

     refresh;

   end;

end;

 

procedure tform1.goster;

var

save:longint;

begin

     if borderstyle=bsnone then exit;

     save:=getwindowlong(handle,gwl_style);

     if (save and ws_caption)<>ws_caption then

     begin

     case borderstyle of

     bssingle,

     bssizeable: setwindowlong(handle,gwl_style,save or ws_caption or ws_border);

     bsdialog:setwindowlong(handle,gwl_style,save or ws_caption or ds_modalframe or ws_dlgframe);

     end;

     height:=height+getsystemmetrics(sm_cycaption);

     refresh;

   end;

end;

 

 

procedure TForm1.Button1Click(Sender: TObject);

begin

      sakla

end;

 

procedure TForm1.Button2Click(Sender: TObject);

begin

      goster

end;

 

end.

Bu web sitesi ücretsiz olarak Bedava-Sitem.com ile oluşturulmuştur. Siz de kendi web sitenizi kurmak ister misiniz?
Ücretsiz kaydol