كيف اثبت هذا المكون في دلفي 7 U_Usb
#1
السلام عليكم و رحمة الله و بركاته
لقد حملت unit لمكون يكشف ادخال وا خراج usb لكني لم استطع تثبيته


الملفات المرفقة
.rar   U_usb.rar (الحجم : 1.18 ك ب / التحميلات : 32)
الرد
#2
وعليكم السلام ورحمة الله تعالى وبركاته.

كود :
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,u_usb; type TForm1 = class(TForm) procedure usbin(sender:tobject); procedure usbout(sender:tobject); procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; test: tcomponentusb; implementation {$R *.dfm} procedure TForm1.usbin(sender: tobject); begin showmessage('تم ادخال الفلاش ديسك'); end; procedure TForm1.usbout(sender: tobject); begin showmessage('تم اخراج الفلاش ديسك'); end; procedure TForm1.FormCreate(Sender: TObject); begin test:=tcomponentusb.create(self); test.OnUSBArrival:=usbin; test.OnUSBRemove:=usbout; end; end.
وحيداً فريداً في التراب وإنما قرين الفتى في القبر ما كان يعمل
الرد
#3
شكرا جزيلا يا اخي بارك الله فيك
الرد
#4
اخي بن دهبية ما رايك باضافة تعليمة هدم في الحدث
إقتباس :procedure tform1.formcreate(sender: Tobject);
begin
test:=tcomponentusb.create(self);
test.onusbarrival:=usbin;
test.onusbremove:=usbout;
test.destroycomponents;

end
و من طلب العلوم بغير كد _________ سيدركها إذا شاب الغراب
الرد


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم