با نوشتن این کد شما می توانید یک ProgressBar در ListBox داشته باشید.
یک دکمه روی فرم قرار داده و دو بار روی آن کلیک کنید و کد زیر را بنویسید :
procedure TForm1.Button1Click(Sender: TObject);
var
r: TRect;
pb: TProgressBar;
begin
Listview1.Columns.Add.Width := 100;
Listview1.Columns.Add.Width := 200;
Listview1.ViewStyle := vsReport;
Listview1.Items.Add.Caption := 'Text';
r := Listview1.Items[0].DisplayRect(drBounds);
r.Left := r.Left + Listview1.columns[0].Width;
r.Right := r.Left + Listview1.columns[1].Width;
pb := TProgressBar.Create(Self);
pb.Parent := Listview1;
pb.BoundsRect := r;
pb.Position := 30;
Listview1.Items[0].Data := pb;
end;
سپس یک دکمه دیگر روی فرم قرار داده و کد زیر را وارد نمایید:
procedure TForm1.Button2Click(Sender: TObject);
var
pb: TProgressBar;
begin
pb := TProgressBar(Listview1.Items[0].Data);
pb.StepIt;
end;
Registering DLL and ActiveX controls from code | |||
One of the features that make Delphi so popular is that when it comes to project deployment, you as a developer (in most cases) only need to send the executable file (exe) of your application. However, in some situations, for example when you import an ActiveX control into your project, you'll need to make sure that this ActiveX control is registered on your users machines. If the control is not registered there, an EOleSysError exception will be displayed to your user eyes. RegSvr32.exe RegSvr32.exe has the following command-line options: Regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname /s - Silent; display no message boxes /u - Unregister server /i - Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall /n - do not call DllRegisterServer; this option must be used with /i From To call the regsvr32 tool from within This is how the 'RegisterOCX' procedure could look:
Note: the ocxPath variable points to the 'Flash.ocx' Macromedia ActiveX control. To be able to register itself, an ActiveX control needs to implement the DllRegisterServer function. In simple words, this function creates registry entries for all the classes inside the control. We do not need to worry about the DllRegisterServer function we just want to make sure it is there. For the sake of simplicity, we've presumed that the ActiveX control (the *.ocx file) is located in the same folder as where your application is. The red line in the above code, does the job of calling the regsvr32 tool by passing the "/s" switch along with the full path to the ActiveX control. The function is ExecAndWait.
|
karet alie, moafagh bashi
سلام و خسته نباشید
البته من نمیخواهم اظهار نظر کنم بلکه شرایط همکاری شما را در پروژه میخواهم بدانم. در صورت امکان با شماره تلفن ۰۹۱۴۳۱۰۷۵۶۴ تماس حاصل فرمایید.
متشکرم
سلام بابک جان
می خواهم از طریق کد نویسی یه بانک توی اکسس درست کنم . لطفا راهنمائیم کن. ممنون
Salam dost aziz man webmaster site www.hamsafar4u.com hastam va az shoma va kheili az weblog nevisha daram baraye hamkari dar site va dar talarha baraye rahandazi site bozorg va pormohtava komak migiram ba ma tamas begirid
با سلام و خسته نباشید
ببخشید می خواستم ازتون بپرسم که اگه ممکنه به من کمک کنید من اطلاعاتی در مورد کلاینت و سرور کردن بصورت شبکه های محله ای با استفاده از دلفی می خواهم اگر ممکن است مرا راهنمایی کنید
متشکرم