Arsip: ada yang tau komponent edbedit

 
user image
more 16 years ago

alvonz

rekan2 delphi-id.org, saya mau tanya ada yang tau komponen edbedit gak.. sy ada contoh program, muncul edbedit.dcu not found jika ada yang punya atau yang tau nama komponennya plis kasih tau saya udah nanya embah google gak dapet, :?: :?:
user image
more 16 years ago

ImanD

@alvonz cobain yg ini bro,

unit Edbedit;
interface
uses
  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  Forms, Dialogs, StdCtrls, Mask, DBCtrls;
type
  TEDBEdit = class(TDBEdit)
  private
    { Private declarations }
  protected
    { Protected declarations }
    procedure KeyPress(var Key: Char); override;
    procedure KeyDown(var Key: Word; Shift: TShiftState); override;
  public
    { Public declarations }
  published
    { Published declarations }
  end;
procedure Register;
implementation
procedure Register;
begin
  RegisterComponents('Samples', [TEDBEdit]);
end;
procedure TEDBEdit.KeyPress(var Key: Char);
var
   MYForm: TForm;
begin
   if Key =#13then
   begin
       MYForm := GetParentForm( Self );
       if not (MYForm = nil ) then
           SendMessage(MYForm.Handle, WM_NEXTDLGCTL, 0, 0);
       Key :=#0;
   end;
   if Key <>#0then inherited KeyPress(Key);
end;
procedure TEDBEdit.KeyDown(var Key: Word; Shift: TShiftState);
var
   MYForm: TForm;
   CtlDir: Word;
begin
   if (Key = VK_UP) or (Key = VK_DOWN) then
   begin
       MYForm := GetParentForm( Self );
       if Key = VK_UP then CtlDir := 1
       else CtlDir :=0;
       if not (MYForm = nil ) then
           SendMessage(MYForm.Handle, WM_NEXTDLGCTL, CtlDir, 0);
   end
   else inherited KeyDown(Key, Shift);
end;

end.
Ref: http://www.programmersheaven.com/download/6026/0/ZipView.aspx
user image
more 16 years ago

alvonz

ok terima kasih bos ImanD saya coba dulul :lol:
user image
more 16 years ago

alvonz

@ImanD: @alvonz procedure TEDBEdit.KeyPress(var Key: Char); var MYForm: TForm; begin if Key =#13then begin MYForm := GetParentForm( Self ); if not (MYForm = nil ) then SendMessage(MYForm.Handle, WM_NEXTDLGCTL, 0, 0); Key :=#0; end; if Key <>#0then inherited KeyPress(Key); end; procedure TEDBEdit.KeyDown(var Key: Word; Shift: TShiftState); var MYForm: TForm; CtlDir: Word; begin if (Key = VK_UP) or (Key = VK_DOWN) then begin MYForm := GetParentForm( Self ); if Key = VK_UP then CtlDir := 1 else CtlDir :=0; if not (MYForm = nil ) then SendMessage(MYForm.Handle, WM_NEXTDLGCTL, CtlDir, 0); end else inherited KeyDown(Key, Shift); end; end. [/pas] Ref: http://www.programmersheaven.com/download/6026/0/ZipView.aspx
muncul error
user image
more 16 years ago

ImanD

@alvonz mana image nya? bro image nya kudu di upload dong, moso di local sech. ni buat upload image http://share.delphi-id.org/
user image
more 16 years ago

alvonz

lah kok gambar errornya gak muncul gmn caranya yah
user image
more 16 years ago

LuriDarmawan

@alvonz: lah kok gambar errornya gak muncul gmn caranya yah
tuh.. sudah di jawab sama @ImanD
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