Friday, Jul 19 Week 29

Page 2 of 3  
Showing no. 21 to 40 of 42 items PreviousNext  

Delphi: Fast copy characters from a string pointer. function pCopy(p:pAnsiChar;n:longWord):ansiString; var rP:pAnsiChar; begin setLength(result,n); rP:=pAnsiChar(result); while n0 do begin rP^:=p^; inc(rP); inc(p); dec(n); end; end; procedure TForm1.FormCreate(Sender: TObject); var s:ansiString; begin s:='1234567890'; caption:=pCopy(pAnsiChar(s),4); end;

Thailand travel pages of MBS Travel & Photography. Nice country with many attractions to visit on your travel.. Welcome to the Thailand travel pages of MBS Travel &Photography. Nice country with many attractions to visit on your travel

Delphi components, examples and information etc

Delphi: Get filename and arguments from a LNK-shortcut file. uses windows,shellApi,comObj,shlObj,activeX; type TPathStr = array[byte] of ansiChar; function getLnkShortcut(aFileName:string;out aFile,aArgu:string):boolean; var s :TPathStr; wfs :TWin32FindDataA; psl :iShellLinkA; ppf :iPersistFile; begin result:=false; aFile:=''; aArgu:=''; if coCreateInstance(CLSID_SHELLLINK,nil,CLSCTX_INPROC_SERVER,iShellLinkA,psl)=NOERROR then if

Tcp-Ip range scanner with port scanner. IP-range scanner Built-in port scanner Auto-update lets you know if clients stay online Connect to network folder (right click menu) Network adaptor list (right click menu) Brute force calculator Enter your IP-range and click update. Results listed showing IP-address, host name, MAC-address and time (in milliseconds). If port scanner is enabled, click the left symbol to pop out those results. Using the auto-update feature will keep scanning the IP-range in a

TLedPanel component for Delphi. TLedPanel component for Delphi is simple and easy to use. A small demo project is included in the archive

Delphi: Extract GIF frames to folder (TGifImage 2.2). Extract each frame from a GIF animation to a folder. The separate images is drawn on a bitmap, while it is saved as files in the folder. uses sysUtils, gifImage, graphics, classes, ... //.. function gifFramesToFolder(gif:TGifImage;aDestDir:string):boolean;overload; var i:longInt;bmp:TBitmap;r:TRect;gc:TGifGraphicControlExtension;s:string; begin result:=false; bmp:=TBitmap.create; with gif do try bmp.pixelFormat:=pf24bit; bmp.width:=width;

Learn how to play piano songs and enjoy the program playing MIDI-files on the screen keyboard.. Learn how to play piano songs and enjoy the program playing MIDI-files on the screen keyboard. Using the mouse will trigger the musical notes of the keyboard. Setup up midi out (in the main window) if you want to hear the music, and setup midi in, if you want to connect your keyboard or other MIDI equipment to the program. Choose a MIDI-file and press play. Use the previous and next buttons to select neighbour

Delphi: Check if a string contains a valid IP-address. Fast routine to verify af a string contains an IP-address (IPv4) of valid syntax. function validIp(p:pAnsiChar):boolean; function pCopy(p:pAnsiChar;n:longWord):ansiString; function pLen(p:pAnsiChar):longWord; implementation {$R *.dfm} const NULL = #0; //Blank char NONE = $00; //Blank number function validIp(p:pAnsiChar):boolean; var lP:pAnsiChar;i,e:integer;b:byte; begin result:=false; b:=NONE; lP:=p; while p^NULL do

Delphi: Prime numbers (32-Bit). function isPrimeNumber(n:longWord):boolean; var i,k:longWord; begin k:=0; for i:=1 to n do begin if n mod i=0 then inc(k); if k>2 then break; end; result:=k=2; end;

Delphi: Get length of a string or string pointer. const NULL = #0; //Blank char function pLen(p:pAnsiChar):longWord; var p1:pAnsiChar; begin if p=nil then begin result:=0;exit end; p1:=p; while p^NULL do inc(p); result:=p-p1 end; procedure TForm1.FormCreate(Sender: TObject); var s:ansiString; begin s:='abc'; caption:=intToStr(pLen(pAnsiChar(s))); end;

A byte is a number in the range from 0 to 255 (256 possible values). A byte is a number in the range from 0 to 255 (256 possible values). This is an unsigned number because all possible values are positive. A signed byte is a number in the range is -128 to 127 (256 possible values). With signed numbers the first bit is reserved for the /- sign. Now the highest value of a signed byte is 127, so 127 1 = -128. For a single bit there is two possible values: 0 and 1. With two bits the first bit can again be 0

Re-route MIDI inputs to other outputs. PITCH Slider to monitor/adjust the pitch parameter. MOD WHEEL Slider to monitor/adjust the modulation wheel parameter. VOLUME Knob to monitor/adjust the volume parameter. BALANCE Knob to monitor/adjust the balance parameter. PAN Knob to monitor/adjust the pan parameter. CUTOFF Knob to monitor/adjust the cut-off parameter. RESONANCE Knob to monitor/adjust the resonance parameter. Small keyboard for monitoring MIDI notes while connected. Also indicators for sustain

Scan pc for undesired files and close undesired running processes. QClean is easy to use, and it is also possible, to modify the included .INI-file,- if you want to add more undesired processes, files or folders. You can add a lot of help files, samples like audio/video, PDF-files, even shortcuts and so.. This is nice after reinstalling Windows and all your default programs,- and you want to remove certain unnecessary/undesired files and samples,- that are included by many programs. Windows 7, Vista, XP,

Delphi: Remove HTML-tags from text. const NULL = #0; function pPos(p:pAnsiChar;ch:char):longWord; var q:pAnsiChar; begin result:=0; q:=p; while p^NULL do if p^=ch then begin result:=p-q 1;exit end else inc(p); end; function removeHtml(p:pAnsiChar;aLen:longWord):ansiString; const ch=['0'..'9','a'..'z','A'..'Z']; var eP,rP,p1:pAnsiChar;v,n:longWord; begin setLength(result,aLen);if aLen=0 then exit; rP:=pAnsiChar(result); p1:=rP; n:=aLen;

Delphi: Find random number, float, boolean, text or color. function maybe(aRandomize:boolean=false):boolean; //Random boolean begin if aRandomize then randomize; result:=random(2)=0; end; function randomRange(min,max:longInt;aRandomize:boolean=false):longInt; begin if aRandomize then randomize; result:=random(max-(min-1)) min; end; function randomFloat(aMin,aMax:double):double; begin result:=randomRange(trunc(aMin*1000),trunc(aMax*1000))/1000 //three decimals end; function

Delphi: Get lower case file extension from a string. const NULL = #0; function lcFileExt(p:pAnsiChar;aWantDot:boolean=false):ansiString; var dP:pAnsiChar; begin dP:=nil; while p^NULL do begin if p^='.' then dP:=p;inc(p) end; if dP=nil then begin result:='';exit end; if not aWantDot then inc(dP); setLength(result,p-dP);p:=pAnsiChar(result); while dP^NULL do begin p^:=dP^;if p^ in ['A'..'Z'] then inc(p^,$20); inc(p);inc(dP) end end; procedure

Making RJ45 cables. Use the two following two ways to connect between different networking equipment. 8P8C plug, 8-position modular connectors, RJ45 network. T568B->T568B termination, TIA/EIA-568-B Used between PC and switch/hub/modem. T568B (Brown,Brown/White,Green,Blue/White,Blue,Green/White,Orange,Orange/White) T568B (Brown,Brown/White,Green,Blue/White,Blue,Green/White,Orange,Orange/White) T568A->T568B termination, TIA/EIA-568-B Used between PC and PC/router/uplink-port. T568A

Delphi: Use TLabel as link to a web site (URL). Create new label on the form, and doubleclick on it to create OnClick event. uses windows,shellApi,forms; function launchUrl(url:ansiString;h:THandle=INVALID_HANDLE_VALUE):boolean; begin if h=INVALID_HANDLE_VALUE then h:=application.handle; result:=shellExecuteA(h,'open',pAnsiChar(url),nil,nil,SW_NORMAL)>0; end; procedure TForm1.Label1Click(Sender: TObject); begin launchUrl('') end;

Delphi: Count characters from a string. The routine can be used to count dots in domain names and many other things. Because of the use of pointers the routine is fast. type TCharSet = set of ansiChar; //Allows multiple chars as argument in routine below const NULL = #0; function pCount(p:pAnsiChar;ch:TCharSet):longWord; begin result:=0; if pnil then while p^NULL do begin if p^ in ch then inc(result); inc(p) end end; procedure TForm1.FormCreate(Sender: TObject); var n:longWord;s:ansiString; begin

Showing no. 21 to 40 of 42 items PreviousNext