摘要:
python中有类似C++的多重继承,这个特性为Java,Delphi,VB等所不具有的,应予以重视*** Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32. ***>>> class A:... name='A'... _num=1... def show(self):... print self.name... print self._num... def setnum(self,num):... self._num=num... >>& 阅读全文
摘要:
procedure SaveToExcel(AFile:string);varsheet,XLApp,workbook:Variant;iRow,MaxRow:integer;beginscreen.Cursor :=TADOTable.Create(nil);ADOTable.Connectionstring :=FConnstr;XLApp:=CreateObject('Excep.Application');workbook:=CreateObject('Excel.Sheet');XLApp.DisplayAlerts :=false;XLApp.Scr 阅读全文
摘要:
procedure GetDiskInfo(var TotalSize,FreeSize:Integer;Disk:string); //单位为兆(M)varfreespace,totalspace:int64;beginif (Pos('\',TrimRight(Disk)<>Length(Disk) thenDisk :=Disk+'\';GetDiskFreeSpaceEx(pchar(Disk),freespace,totalspace,nil);TotalSize :=totalspace div 1024 div 1024;freesiz 阅读全文
摘要:
procedure SetIISDir(Dir,BieMing:string);varI:IADSContainer;ADS:IADS;beginif ADSGetObject('IIS://localhost/w3svc',IID_IADSContainer,IUnkown(I))=S_OK thenbeginADS :=IADS(I.GetObject('IISWebServer','1'));if ADS.QueryInterface(IID_IADSContainer,I)=S_OK) thenbeginADS :=IADS(I.GetO 阅读全文
摘要:
uses ShlObj;写入ShAddtoRecentDes(SHARE_PATH,pchar('C:\1.txt')); 阅读全文
摘要:
加一过程procedure WMhotkeyhandle(var msg:TMessage); message wm_hotkey;procedure TForm1.WMHotkeyhandle(var msg:TMessage);beginif (msg.LParamHi=$41) and (msg.LParamLo=NOD_CONTROL or mod_Alt) thenbeginmsg.Result :=1;Application.BringToFront;end;end;//注册热键procedure TForm1.FormCreate(Sender:TObject);beginhot 阅读全文
摘要:
在窗体上加入TeeChart控件,并通过属性加入4个TLineSeries,分别命名为Series1,Series2,Series3,Series4,并添加一按钮Button1,其Click事件为:procedure TForm1.Button1Click(Sender:TObject);beginSeries1.FillSampleValues(200);Series2.FillSampleValues(200);Series3.FillSampleValues(200);Series4.FillSampleValues(200);with chart1.LeftAxis dobeginst 阅读全文
摘要:
1.先在Access中建立一带参数的查询,如“查询1”,select qdj for xxj_qdj2006_06_30 when dm=tmp2.在Delphi中加入一ADOQuery控件,指向Access数据库,并在SQL属性中加入select * from 查询1,这时在parameters会自动加入一参数tmp3.加入一按钮,写入with adoquery1 dobeginclose;parameters.Parambyname('tmp').Value :='4011223999';Open;end; 阅读全文