Arsip: Minta Bantuan Teman2

 
user image
more 19 years ago

saysansay

Maaf! Saya Mau Minta Bantuan... Disini Saya Kesulitan 1. Saat Program ditutup Posisi Mouse Harus Berada Pada Button Ok Dengan Mengguna Kan Messagedlg/setfocus pd button ok..saaat program exit(Ada Yang Tau Source Codenya nga?) 2. Apakah Bisa Didelphi Menggunakan Crystal Report..Kalau Ada Yang Bisa Saya Minta Tolong Gimana Cara Insstal Crystal Reportnya?Dan Langkah Awalnya.. Tahnk's Email : Saysansay@yahoo.com
user image
more 19 years ago

tox2wow

oops... sory, kebanyakan nge-klik ... :oops:
user image
more 19 years ago

tox2wow

1. Hmm, kalo logika gw, MessageDlg - nya harus bikin sendiri nih, baru bisa di pake fungsi SetFocus. Algoritmanya : [code:1:82f05d44d8] var NamaTombol: array[TMsgDlgBtn] of string = ( 'OK', 'Cancel'); function TombolSetPokus(const Pesan: string; Tipe: TMsgDlgType; Tombol: TMsgDlgButtons; Pokus: TMsgDlgBtn; HelpKontek: Longint): Integer; var Tbl: TComponent; begin with CreateMessageDialog(Pesan, Tipe, Tombol) do try HelpContext := HelpKontek; Position := poScreenCenter; Tbl := FindComponent( NamaTombol[Pokus] ); if (Tbl <> nil) and (Tbl is TWinControl) then ActiveControl := Tbl as TWinControl; Result := ShowModal; finally Free; end; end; procedure Form1.onClose(Sender : TObject) begin // Panggil message dialog-nya TombolSetPokus('Ngapain lo tutup form ini ? Puk yu lah ..', mtConfirmation, [mbOk, mbCancel], mbOK, 0); end; [/code:1:82f05d44d8] Tapi kalo buat posisi Mouse yang berada di atas tombol OK, saat message ditampilkan, gimana ya ??? Mungkin mas2 delphi-id yang lain bisa bantu nihh !! Coba kalo pake link ini : {How to move the mouse automatically to the center of the control that has the focus...} http://www.delphi3000.com/articles/article_615.asp?SK= Untuk ' SK = ' nya, ada yang tau nyarinya pake tools apa ya ??? wakakaka ... (Coba kalo di isi sama cookie, di cari pake Brutus. Wahhhh .) :twisted: 2. Crystal Report ??? Apa nihhh ??? . Kayanya pernah denger nih Crystal Report. Buat VB ya ??? wahhh, seru juga nihhh, Delphi vs VB. .... :evil:
user image
more 19 years ago

cyber_hecker

wakakakaka... :D pertanyaan bagus.. sip.. sip.. :P, dan anda lagi beruntung karena malam ini malam minggu, gue jadi males tidur. takut entar pagi ketinggalan kartun dragonball, jadi iseng bikin fungsi untuk message dialog auto focus :oops: wakakakak :D setelah bereksperimen beberapa jam jadilah listing dibawah ini :
function CursorMsgDlg(sCaption : String; vDlgType: TMsgDlgType;
  vButton: TMsgDlgButtons; sButton: String) : TModalResult;
var
  aMsgDlg : TForm;
  pt : TPoint;
begin
  aMsgDlg := CreateMessageDialog(
    sCaption,
    vDlgType,
    vButton);
  {Get the point in the center of dialog button}
  if aMsgDlg.FindComponent(sButton) <> nil then
  begin
    Pt.x := (aMsgDlg.FindComponent(sButton) As TButton).Left +
      ((aMsgDlg.FindComponent(sButton) As TButton).Width div 2);
    Pt.y := (aMsgDlg.FindComponent(sButton) As TButton).Top +
      ((aMsgDlg.FindComponent(sButton) As TButton).Height div 2);
    Pt := aMsgDlg.ClientToScreen(Pt);
    SetCursorPos(pt.X, pt.y);
  end;
  with aMsgDlg do
    try
      Caption := 'cyber hecker dialog';
      Result := ShowModal;
    finally
      Free;
    end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
  if CursorMsgDlg('silakan di klik...',
    mtInformation,[mbYes, mbNo], 'Yes') = mrYes then
    Caption := 'Yes Di tekan' else
    Caption := 'No Di tekan';
end;
silakan lanjutkan eksperimen-nya wakakak :D untuk pertanyaan no.2 belum ku coba.. habis udah kebanyakan komponen, entar tambah berat aja delphiku :oops: jadi nunggu temen2 delphi-id yang lain aja yach :D nb. untuk variabel sButton, gue belum check nama komponennya apa aja. yang sudah ku coba adalah : 'Yes' = mbYes, 'No' = mbNo, 'OK' = mbOK, 'Cancel' = mbCancel. selanjutnya.. ya terserah anda.. wakakakak :D
more ...
  • Pages:
  • 1
Share to

AI Forward

🚀 We're thrilled to partner with Alibaba Cloud for "AI Forward - Alibaba Cloud Global Developer Summit 2025" in Jakarta! Join us and explore the future of AI. Register now: https://int.alibabacloud.com/m/1000400772/
#AlibabaCloud #DeveloperSummit #Jakarta #AIFORWARD

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com