Arsip: Generate even

 
user image
more 13 years ago

delphicode

hallo nanya lagi nih, gw punya skrip spt ini : procedure TForm1.FormCreate(Sender: TObject); var Tombol : TButton; begin Tombol :=TButton.Create(Self); With Tombol Do Begin Caption := 'Load File'; Top := 10; Left :=10; Parent := Form1; OnClick:=ShowMessage('Delphi Beginner'); end; end; nah gw bingung cara bikin even OnClik buat Tombol, gw mohon pencerahannya dari rekan2 semua...
user image
more 13 years ago

donlego

bkin procedure klik sendiri bos procedure TForm1.panelclick; begin ShowMessage((Sender as Tpanel).name); end; onclick=panelklik
user image
more 13 years ago

delphicode

masih gak muncul, nih skrip gw unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private { Private declarations } Procedure Klik(Sender: TObject); public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); var Tombol : Tbutton; begin tombol := TButton.Create(Self); with Tombol do Begin Left := 10; Top := 10; Caption := 'Load'; Parent := Form1; End; end; Procedure TForm1.Klik(Sender: TObject); begin ShowMessage((Sender as TButton).Name); OnClick:=Klik; end; kalau ada skrip yang kurang/salah mohon di betulkan...trim's
user image
more 13 years ago

donlego

h e he taroh on kliknya di abis with tombol do begin onclick:=klik; bla bla; end;
user image
more 13 years ago

n3o_cybertech


unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
Procedure Klik(Sender: TObject);
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
 Tombol : Tbutton;
begin
tombol := TButton.Create(Self);
with Tombol do
  Begin
    Left := 10;
    Top := 10;
    Caption := 'Load';
    Parent := Form1;
    OnClick:=Klik;
  End;
end;
Procedure TForm1.Klik(Sender: TObject);
begin
  ShowMessage((Sender as TButton).Name);
end;
OnClick := klik jangan diletakkin di dalam prosedurnya sendiri, buat apa diletakkin disitu....hehehe... :lol:
user image
more 13 years ago

DelphiExpert

buat ngeklik tombol sebelahnya :mrgreen:
more ...
  • Pages:
  • 1
Share to

Random Topic

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