Jump to content

MessageDlg Çağrısında Block Yapılamıyor


alp.yilmaz

Recommended Posts

Aşağıdaki Şekilde Çağrılan Message Dialog Nesnesi Form Üzerindeki Nesneleri Block Etmiyor ve TAB Tuşu ile üzerlerinde Gezine biliniyor Hatta Değişiklik bile yapılabiliyor

Bunu Engellemenin Bir Yöntemi Varmıdır.   Yani MessageDLG Nesnesi ShowModal Açılabilirmi?

 

 

 

 

MessageDlg('Formu Kapatmak Üzeresiniz...', mtWarning, mbYesNo, CallBack);

 

procedure TUniForm1.CallBack(Sender: TComponent; Res: Integer);
begin
  case Res of
    mrYes : Begin
              Close();

              Exit;
            End;

    mrNo :  Begin
             UniEdit1.SetFocus;
             Exit;
            End;
  end;
end;

Link to comment
Share on other sites

 private nin altına aşağıdaki tanımı yapıyoruz.
procedure IslemSil(Sender: TComponent; Res: Integer);
 
sonra aşağıdaki tanımı yapıyoruz. ve işine yapılmak istenilenleri yazıyoruz.
 
procedure TMainForm.IslemSil(Sender: TComponent; Res: Integer);
begin
if Res=mrYes then
begin


// bu beginden sonra yapılacak bütün işlemler buraya yazılıyor


end;


end;
 
Kullanımı
 
procedure TMainForm.UniButton1Click(Sender: TObject);
begin
MessageDlg('Kaydı Silmek İstediğinize Emin misiniz?', mtConfirmation, mbYesNo, IslemSil);
end;

ben bu şekilde kullanıyorum. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...