freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

[計(jì)算機(jī)]delphi技巧集(編輯修改稿)

2025-09-13 03:56 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 0)。 if Result then begin if (flags and INTERNET_CONNECTION_MODEM) = INTERNET_CONNECTION_MODEM then begin showmessage(39。Modem39。)。 end。 if (flags and INTERNET_CONNECTION_LAN) = INTERNET_CONNECTION_LAN then begin showmessage(39。LAN39。)。 end。 if (flags and INTERNET_CONNECTION_PROXY) = INTERNET_CONNECTION_PROXY then begin showmessage(39。Proxy39。)。 end。 if (flags and INTERNET_CONNECTION_MODEM_BUSY)=INTERNET_CONNECTION_MODEM_BUSY then begin showmessage(39。Modem Busy39。)。 end。 end。 end。 ◇[DELPHI]如何判斷字符串是否是有效EMAIL地址 function IsEMail(EMail: String): Boolean。 var s: String。ETpos: Integer。 begin ETpos:= pos(39。@39。, EMail)。 if ETpos 1 then begin s:= copy(EMail,ETpos+1,Length(EMail))。 if (pos(39。.39。, s) 1) and (pos(39。.39。, s) length(s)) then Result:= true else Result:= false。 end else Result:= false。 end。 ◇[DELPHI]判斷系統(tǒng)是否連接INTERNET 。 函數(shù)申明為: function InetIsOffline(Flag: Integer): Boolean。 stdcall。 external 39。39。 然后就可以調(diào)用函數(shù)判斷系統(tǒng)是否連接到INTERNET if InetIsOffline(0) then ShowMessage(39。not connected!39。) else ShowMessage(39。connected!39。)。 該函數(shù)返回TRUE如果本地系統(tǒng)沒(méi)有連接到INTERNET。 附: 大多數(shù)裝有IE或OFFICE97的系統(tǒng)都有此DLL可供調(diào)用。 InetIsOffline BOOL InetIsOffline( DWORD dwFlags, )。 ◇[DELPHI]簡(jiǎn)單地播放和暫停WAV文件 uses mmsystem。 function PlayWav(const FileName: string): Boolean。 begin Result := PlaySound(PChar(FileName), 0, SND_ASYNC)。 end。 procedure StopWav。 var buffer: array[0..2] of char。 begin buffer[0] := 0。 PlaySound(Buffer, 0, SND_PURGE)。 end。 ◇[DELPHI]取機(jī)器BIOS信息 with do begin Add(39。MainBoardBiosName:39。+^I+string(Pchar(Ptr($FE061))))。 Add(39。MainBoardBiosCopyRight:39。+^I+string(Pchar(Ptr($FE091))))。 Add(39。MainBoardBiosDate:39。+^I+string(Pchar(Ptr($FFFF5))))。 Add(39。MainBoardBiosSerialNo:39。+^I+string(Pchar(Ptr($FEC71))))。 end。 ◇[DELPHI]網(wǎng)絡(luò)下載文件 uses UrlMon。 function DownloadFile(Source, Dest: string): Boolean。 begin try Result := UrlDownloadToFile(nil, PChar(source), PChar(Dest), 0, nil) = 0。 except Result := False。 end。 end。 if DownloadFile(39。, 39。c:\39。) then ShowMessage(39。Download succesful39。) else ShowMessage(39。Download unsuccesful39。) ◇[DELPHI]解析服務(wù)器IP地址 uses winsock function IPAddrToName(IPAddr : String): String。 var SockAddrIn: TSockAddrIn。 HostEnt: PHostEnt。 WSAData: TWSAData。 begin WSAStartup($101, WSAData)。 := inet_addr(PChar(IPAddr))。 HostEnt:= gethostbyaddr(@, 4, AF_INET)。 if HostEntnil then result:=StrPas(Hostent^.h_name) else result:=39。39。 end。 ◇[DELPHI]取得快捷方式中的連接 function ExeFromLink(const linkname: string): string。 var FDir, FName, ExeName: PChar。 z: integer。 begin ExeName:= StrAlloc(MAX_PATH)。 FName:= StrAlloc(MAX_PATH)。 FDir:= StrAlloc(MAX_PATH)。 StrPCopy(FName, ExtractFileName(linkname))。 StrPCopy(FDir, ExtractFilePath(linkname))。 z:= FindExecutable(FName, FDir, ExeName)。 if z 32 then Result:= StrPas(ExeName) else Result:= 39。39。 StrDispose(FDir)。 StrDispose(FName)。 StrDispose(ExeName)。 end。 ◇[DELPHI]控制TCombobox的自動(dòng)完成 {39。Sorted39。 property of the TCombobox to true } var lastKey: Word。 //全局變量 //TCombobox的OnChange事件 procedure (Sender: TObject)。 var SearchStr: string。 retVal: integer。 begin SearchStr := (Sender as TCombobox).Text。 if lastKey VK_BACK then // backspace: VK_BACK or $08 begin retVal := (Sender as TCombobox).Perform(CB_FINDSTRING, 1, LongInt(PChar(SearchStr)))。 if retVal CB_Err then begin (Sender as TCombobox).ItemIndex := retVal。 (Sender as TCombobox).SelStart := Length(SearchStr)。 (Sender as TCombobox).SelLength := (Length((Sender as TCombobox).Text) Length(SearchStr))。 end。 // retVal CB_Err end。 // lastKey VK_BACK lastKey := 0。 // reset lastKey end。 //TCombobox的OnKeyDown事件 procedure (Sender: TObject。 var Key: Word。 Shift: TShiftState)。 begin lastKey := Key。 end。 ◇[DELPHI]如何清空一個(gè)目錄 function EmptyDirectory(TheDirectory :String 。 Recursive : Boolean) : Boolean。 var SearchRec : TSearchRec。 Res : Integer。 begin Result := False。 TheDirectory := NormalDir(TheDirectory)。 Res := FindFirst(TheDirectory + 39。*.*39。, faAnyFile, SearchRec)。 try while Res = 0 do begin if ( 39。.39。) and ( 39。..39。) then begin if (( and faDirectory) 0) and Recursive then begin EmptyDirectory(TheDirectory + , True)。 RemoveDirectory(PChar(TheDirectory + ))。 end else begin DeleteFile(PChar(TheDirectory + )) end。 end。 Res := FindNext(SearchRec)。 end。 Result := True。 finally FindClose()。 end。 end。 ◇[DELPHI]如何計(jì)算一個(gè)目錄的大小 function GetDirectorySize(const ADirectory: string): Integer。 var Dir: TSearchRec。 Ret: integer。 Path: string。 begin Result := 0。 Path := ExtractFilePath(ADirectory)。 Ret := (ADirectory, faAnyFile, Dir)。 if Ret NO_ERROR then exit。 try while ret=NO_ERROR do begin inc(Result, )。 if ( in [faDirectory]) and ([1] 39。.39。) then Inc(Result, GetDirectorySize(Path + + 39。\*.*39。))。 Ret := (Dir)。 end。 finally (Dir)。 end。 end。 ◇[DELPHI]安裝程序如何添加到Uninstall列表 操作注冊(cè)表,如下: \SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall鍵下建立一個(gè)主鍵,名稱(chēng)任意。 例HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MyUninstall \SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MyUnistall下鍵兩個(gè)串值, 這兩個(gè)串值的名稱(chēng)是特定的:DisplayName和UninstallString。 “刪除應(yīng)用程序列表”中的名稱(chēng),如39。Aiming Uninstall one39。 給串UninstallString賦值為執(zhí)行的刪除命令,如 C:\WIN97\ fC:\TestPro\ ◇[DELPHI]截獲WM_QUERYENDSESSION關(guān)機(jī)消息 type TForm1 = class(TForm) procedure WMQueryEndSession(var Message: TWMQueryEndSession)。 message WM_QUERYENDSESSION。 procedure CMEraseBkgnd(var Message:TWMEraseBkgnd)。Message WM_ERASEBKGND。 private { Private declarations } public { Public declarations } end。 procedure (var Message: TWMQueryEndSession)。 begin Showmessage(39。puter is about to shut down39。)。 end。 ◇[DELPHI]獲取網(wǎng)上鄰居 procedure getnethood()。//NT做服務(wù)器,WIN98上調(diào)試通過(guò)。 var a,i:integer。 errcode:integer。 netres:array[0..1023] of netresource。 enumhandle:thandle。 enumentries:dwor
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1