procedure Tfihrist_form.BitBtn2Click(Sender: TObject);
var
str:word;
a,b:string;
begin
str:=application.MessageBox('Baskı Önizleme için EVET i , Doğrudan Yazıcıya Göndermek için HAYIR ı Tıklayınız. ','Hüseyin ERTÜRK',MB_YESNO+MB_ICONQUESTION);
if str=idyes then begin
fihrist_form_yaz.QRLabel12.Caption:=label1.Caption;
fihrist_form_yaz.QuickRep1.PreviewModal;
end else begin
fihrist_form_yaz.QRLabel12.Caption:=label1.Caption;
fihrist_form_yaz.QuickRep1.Print;
end;
end;
araştırdım ama belli seçenkler dışında kendi belirlediğimiz seçeneği nasıl koyacağımızı bulamadım.
bu konuda yardımcı olsursanız sevinirim...
herkese iyi çalışmalar
"Kula bela gelmez Hak yazmayınca,Hak bela yazmaz kul azmayınca..." MEVLANA
function MyMessageDlg(const Msg: string;
DlgType: TMsgDlgType;
Buttons: TMsgDlgButtons;
Captions: array of string;
DefButton: Integer): Integer;
// Uses: Dialogs, stdctrls //
var
aMsgDlg : TForm;
i : Integer;
dlgButton : TButton;
CaptionIndex : Integer;
begin
aMsgDlg := CreateMessageDialog(Msg, DlgType, Buttons);
aMsgDlg.FormStyle := fsStayOnTop;
captionIndex := 0;
for i := 0 to aMsgDlg.ComponentCount - 1 do
begin
if (aMsgDlg.Components[i] is TButton) then
begin
dlgButton := TButton(aMsgDlg.Components[i]);
if CaptionIndex > High(Captions) then Break;
dlgButton.Caption := Captions[CaptionIndex];
dlgButton.Default := dlgButton.ModalResult = DefButton;
if dlgButton.Default then
aMsgDlg.ActiveControl := dlgButton;
Inc(CaptionIndex);
end;
end;
aMsgDlg.Caption := StringReplace(ExtractFileName(Application.Title),'.exe','',[]);
Result := aMsgDlg.ShowModal;
end;
var cevap:word;
begin
cevap:= MYMessageDlg(' Gerçekten Kapatmak mı, ' + #10 +
' Gizlemek mi İstiyorsunuz?', mtConfirmation,[mbYes, mbNo, mbCancel ],['Kapat', 'Gizle', 'Vazgeç'],mrNo);
if cevap=mrYes then begin
...........;
end;
if cevap=mrNo then begin
..........
end;
end;