<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Some thougths, I thought ... &#187; IT thingies</title>
	<atom:link href="http://www.aberez.eu/en/category/it-thingies/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aberez.eu</link>
	<description>To think is to differ - Clarence Darrow</description>
	<lastBuildDate>Tue, 04 Oct 2011 15:41:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Bitcell.info</title>
		<link>http://www.aberez.eu/en/2010/01/bitcell-info/</link>
		<comments>http://www.aberez.eu/en/2010/01/bitcell-info/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 22:42:40 +0000</pubDate>
		<dc:creator>DarkByte</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[IT thingies]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.aberez.eu/?p=988</guid>
		<description><![CDATA[Un nou forum cu temă informatică, o nouă abordare. Sperăm să fie o abordare mai bună 

Vizitaţi-ne pe BitCell.info.
]]></description>
			<content:encoded><![CDATA[<p>Un nou forum cu temă informatică, o nouă abordare. Sperăm să fie o abordare mai bună <img src="http://www.aberez.eu/wp-content/plugins/yahoo-messenger-emoticons/emoticons/happy.gif" style="border:none;background:none;" alt="happy" /></p>
<p><center><a href="http://www.bitcell.info"><img src="http://bitcell.info/styles/rednblack/imageset/site_logo.gif" alt="Bitcell Forum" /></a></center></p>
<p>Vizitaţi-ne pe <a href="http://www.bitcell.info">BitCell.info</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aberez.eu/en/2010/01/bitcell-info/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Un Stick USB, mai multe bucăţi &#8230;</title>
		<link>http://www.aberez.eu/en/2009/10/stick-flash-usb-pieces/</link>
		<comments>http://www.aberez.eu/en/2009/10/stick-flash-usb-pieces/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 12:13:36 +0000</pubDate>
		<dc:creator>DarkByte</dc:creator>
				<category><![CDATA[De-ale vietii]]></category>
		<category><![CDATA[IT thingies]]></category>
		<category><![CDATA[multilanguage]]></category>

		<guid isPermaLink="false">http://www.aberez.eu/?p=680</guid>
		<description><![CDATA[About 2003, when I first heard of USB Flash Drives, I thought it was very interesting. Well, every male&#8217;s eyes stick to nice and handy gadgets. Or curves&#8230;
Of course I bought one for myself. It had the extraordinary capacity of 256 MB, was small, blue and transparent. It was the perfect toy. No more stress [...]]]></description>
			<content:encoded><![CDATA[<p>About 2003, when I first heard of USB Flash Drives, I thought it was very interesting. Well, every male&#8217;s eyes stick to nice and handy gadgets. Or curves&#8230;</p>
<p><img class="alignright" src="http://www.aberez.eu/images/usb_stick.jpg" alt="USB Flash Drive" />Of course I bought one for myself. It had the extraordinary capacity of 256 MB, was small, blue and transparent. It was the perfect toy. No more stress caused by diskettes, no more writing on CD-RW&#8217;s. Just like on a floppy disk, I could write and erase data as I saw fit &#8230; like on a CD, I could transfer a lot of data.</p>
<p>It did, also, make a big hole in my wallet. The huge 256 MB Flash Drive cost me, back then, almost a quarter of my salary. At the same price I could now buy a 16 GB, or even 32 GB, flash drive. I don&#8217;t see why I would do that, though, knowing the reduced transfer speeds of flash drives.</p>
<p>Recently, I found my Flash. It was one piece, functional, light blue and still transparent. As a bonus, I had data on it. Files from another era. Memories. A real treasure.</p>
<p>I inserted it in an USB slot in the front of the computer&#8217;s case and started checking everything on it. After a half an hour, amused, nostalgic, even happy, I went on the balcony for a smoke. When I came back, being caught in a discussion with a co-worker, I stepped right on the flash drive. I wasn&#8217;t content at all.</p>
<p>I looked at the remaining pieces under my show and I was quite surprised to see it almost intact. It was a bit bent, it stripped it&#8217;s blue plastic clothes and I could see the little control board which, too, was a little bent and seemed broken. I tried to insert the rests of the flash in the USB slot, but Windows said it couldn&#8217;t find a driver. Damn it! The only thought that went through my mind was that it needed another flash drive, not a driver.</p>
<p>I tried to unbend the control board, as delicate as possible, and I tried again. To my astonishment, this time it worked flawlessly. I copied all my data from it, and now &#8230; it&#8217;s a blog piece, as you can admire below.</p>

<div class="ngg-galleryoverview" id="ngg-gallery-1-680">


	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://www.aberez.eu/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=1&amp;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-1" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.aberez.eu/wp-content/gallery/emag/1_promo_ceas.png" title=" " class="shutterset_set_1" >
								<img title="1_promo_ceas" alt="1_promo_ceas" src="http://www.aberez.eu/wp-content/gallery/emag/thumbs/thumbs_1_promo_ceas.png" width="103" height="300" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-2" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.aberez.eu/wp-content/gallery/emag/2_emag_comm_1.png" title=" " class="shutterset_set_1" >
								<img title="2_emag_comm_1" alt="2_emag_comm_1" src="http://www.aberez.eu/wp-content/gallery/emag/thumbs/thumbs_2_emag_comm_1.png" width="200" height="146" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-3" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.aberez.eu/wp-content/gallery/emag/3_emag_comm_2.png" title=" " class="shutterset_set_1" >
								<img title="3_emag_comm_2" alt="3_emag_comm_2" src="http://www.aberez.eu/wp-content/gallery/emag/thumbs/thumbs_3_emag_comm_2.png" width="200" height="151" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-4" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.aberez.eu/wp-content/gallery/emag/4_emag_comm_3.png" title=" " class="shutterset_set_1" >
								<img title="4_emag_comm_3" alt="4_emag_comm_3" src="http://www.aberez.eu/wp-content/gallery/emag/thumbs/thumbs_4_emag_comm_3.png" width="200" height="244" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-5" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://www.aberez.eu/wp-content/gallery/emag/5_status_comanda.PNG" title=" " class="shutterset_set_1" >
								<img title="5_status_comanda" alt="5_status_comanda" src="http://www.aberez.eu/wp-content/gallery/emag/thumbs/thumbs_5_status_comanda.PNG" width="200" height="96" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


]]></content:encoded>
			<wfw:commentRss>http://www.aberez.eu/en/2009/10/stick-flash-usb-pieces/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Multilanguage Wordpress</title>
		<link>http://www.aberez.eu/en/2009/10/multilanguage-wordpress/</link>
		<comments>http://www.aberez.eu/en/2009/10/multilanguage-wordpress/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 22:21:38 +0000</pubDate>
		<dc:creator>DarkByte</dc:creator>
				<category><![CDATA[IT thingies]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[multilanguage]]></category>

		<guid isPermaLink="false">http://www.aberez.eu/?p=619</guid>
		<description><![CDATA[For a few days now I am bothered by the idea of modifying my blog as to be multi-language (having the same blog, but to allow me post in more languages and to display the posts according to the global language setting).
The first thought that crossed my mind was to install a new Wordpress for [...]]]></description>
			<content:encoded><![CDATA[<p>For a few days now I am bothered by the idea of modifying my blog as to be multi-language (having the same blog, but to allow me post in more languages and to display the posts according to the global language setting).</p>
<p>The first thought that crossed my mind was to install a new Wordpress for each language that I want to use, but when I thought of all those plugins, settings and all that crap that will bother me, I quit.</p>
<p>Unfortunately, there aren&#8217;t too many informations regarding the possibility of a Wordpress that supports more language at a given time. At a fairly deep search I found a single site that had some promises, so I kept it for when I would start testing.</p>
<p>Fortunately, there is also <a href="http://www.skullbox.info/profile/?u=32">Smash</a> in the world, who found me another two sites that seemed perfect.</p>
<p>I couldn&#8217;t wait anymore. I took xampp, installed it, I took Wordpress, installed it too, I took the database from the blog, imported it in my new localhost blog, adjusted the settings as to be as close to the original ones as possible and I went nuclear.</p>
<p>I started with <a href="http://www.qianqin.de/qtranslate/">qTranslate</a> and I instantly dropped dead when, after I clicked on Activate Plugin, it displayed me a mile-long page cu errors. Good thing there was Google available.</p>
<p>The file &#8220;<strong>qtranslate_core.php</strong>&#8221; must be modified. More clearly, the next piece of code must be commented:</p>
<pre>
	if(is_object($text)||get_class($text) == '__PHP_Incomplete_Class') {
		foreach(get_object_vars($text) as $key => $t) {
			$text->$key = qtrans_use($lang,$text->$key,$show_available);
		}
		return $text;
	}</pre>
<p>After modifying this file, the installation, activation and setting up the plugin are just a breeze.</p>
<p>All I still need to do is to modify the rest of the blog&#8217;s posts. I&#8217;m so screwed <img src="http://www.aberez.eu/wp-content/plugins/yahoo-messenger-emoticons/emoticons/straight_face.gif" style="border:none;background:none;" alt="straight face" /></p>
<p>Good luck with improving Wordpress !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aberez.eu/en/2009/10/multilanguage-wordpress/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Să numărăm ferestrele &#8230;</title>
		<link>http://www.aberez.eu/en/2009/09/sa-numaram-ferestrele/</link>
		<comments>http://www.aberez.eu/en/2009/09/sa-numaram-ferestrele/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 19:20:21 +0000</pubDate>
		<dc:creator>DarkByte</dc:creator>
				<category><![CDATA[De-ale vietii]]></category>
		<category><![CDATA[Delphi]]></category>
		<category><![CDATA[IT thingies]]></category>
		<category><![CDATA[multilanguage]]></category>

		<guid isPermaLink="false">http://www.aberez.eu/?p=605</guid>
		<description><![CDATA[There are (a little) more that 11 years since, for the first time, I found Windows. I have had decided, after some ferm assurances that I would be helped if necessary, to try for the computer department in highschool, although I haven&#8217;t had seen a computer in my life before (this doesn&#8217;t count movies &#8230; [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://www.aberez.eu/images/winlist.png">There are (a little) more that 11 years since, for the first time, I found Windows. I have had decided, after some ferm assurances that I would be helped if necessary, to try for the computer department in highschool, although I haven&#8217;t had seen a computer in my life before (this doesn&#8217;t count movies &#8230; and there they look good <img src="http://www.aberez.eu/wp-content/plugins/yahoo-messenger-emoticons/emoticons/big_grin.gif" style="border:none;background:none;" alt="big grin" />)</p>
<p>Before the entrance exams in the summer of 1998 I was taken by my mother to her job where, at some offices, there were some computers, and the boss daughter used to play there often. Obviously, I went to see how a real computer looks like. Of course that, bright as I knew I was, I imagined that in two weeks I would learn everything that was possible about computers (I don&#8217;t really watch a lot of movies since that disillusionment <img src="http://www.aberez.eu/wp-content/plugins/yahoo-messenger-emoticons/emoticons/straight_face.gif" style="border:none;background:none;" alt="straight face" />)..<span id="more-605"></span> Ştefania, the aforementioned girl, was a year older than me (already in highschool, computer department too) wasn&#8217;t born to be a teacher, so she pushed the power button, some white on black lines started to move on the screen, and I was staring at it. When the lines got tired of moving around, Ştefania wrote three letters, <em>w</em>, <em>i</em>, <em>n</em> and then pushed Enter (Enter &#8230; meaning a big key near the center of the keyboard).</p>
<p>Windows. Versiune: 3.11. Everything became bright, mostly white. Some windows. Then little colorful drawings, in each ocean of white. I immediately noticed that she dived into an ocean full of games and kept on swimming until she found Solitaire. It has been interesting, but &#8230; I mean, I don&#8217;t let the playing cards home down to play cards on a computer.</p>
<p>It&#8217;s been a long time since (from my point of view), but I sticked with Windows. This is another way of saying that it&#8217;s still raining windows. To be honest, it&#8217;s been good years since Linux got windows, too&#8230;</p>
<p>Until recently, I had forgotten how much did the Windows&#8217; windows fascinated me in high school (especially after the Olympiad in Informatics from the 9th grade &#8230; I was told to copy my source files onto a diskette, using Windows &#8230; very penitently, I had to explain to Mrs. Teacher that I had no clue how to do that). So much that, in my 11th grade, I made a program, in Delphi, that would list all the windows from the system, including the hidden ones &#8230; and, even more, to allow me to play with&#8217;em <img src="http://www.aberez.eu/wp-content/plugins/yahoo-messenger-emoticons/emoticons/big_grin.gif" style="border:none;background:none;" alt="big grin" /> Put them <em>always on top</em>, hide them, move them &#8230; good days <img src="http://www.aberez.eu/wp-content/plugins/yahoo-messenger-emoticons/emoticons/happy.gif" style="border:none;background:none;" alt="happy" /></p>
<p>Assuming you had patience up until now, in the next paragraphs I will present this little program, explaining some pieces of the code and, as before, to offer it as open-source.</p>
<p>The first function I needed was <strong><a href="http://msdn.microsoft.com/en-us/library/ms633497(VS.85).aspx">EnumWindows</a></strong>, an API function that retrieves the full list of the system&#8217;s windows, requiring two parameters: a <strong>callback</strong> function and programmer-defined value to be passed to this function. To be perfectly honest, I couldn&#8217;t quite get what that freaking callback is and why, in this case, it would need a parameter for a handle of a single window and my parameter. I mean, in a system there are hundreds of windows &#8230; how would it get them all in a single handle?</p>
<p>I solved this problem quickly by displaying that &#8220;unique&#8221; handle (as I was expecting) in a ShowMessage. Do I still need to say that after the 20th ShowMessage I went back in Delphi and hit Ctrl + F2 (program reset) ? The callback function was called for <strong>every</strong> main window found by EnumWindows, giving me it&#8217;s handle.</p>
<p>Oh goody &#8230; the list of windows is done. I have a list of handles to windows which, honestly, looks smashing. Hammer smashing. I wanted something flashy, eye-candy, something that would show, to whoever would watch, that the program is super-mega-ultra-blah-blah. Hmm &#8230; the title of the window (usually, it&#8217;s caption-bar) would go well &#8230;</p>
<p>I went to finding the window&#8217;s name, something that was generously offered by <strong><a href="http://msdn.microsoft.com/en-us/library/ms633520(VS.85).aspx">GetWindowText</a></strong>, if you bribe it with the window&#8217;s handle and a little room to spill the characters.</p>
<p>Yeah, it&#8217;s already looking better. Still, there are a lot of weird names around here. CiceroUIWndFrame, curtain, AXWIN Frame Window, DDE Server Window, SysFader &#8230; WTF ? Microsoft sucks! What the hell is with this windows ? We need to see them <img src="http://www.aberez.eu/wp-content/plugins/yahoo-messenger-emoticons/emoticons/big_grin.gif" style="border:none;background:none;" alt="big grin" /></p>
<p><strong><a href="http://msdn.microsoft.com/en-us/library/ms633548(VS.85).aspx">ShowWindow</a></strong> to the rescue. A very attractive and funny function. Give a handle, say SW_SHOW and voila &#8230; the window got out from the mist. Say SW_HIDE and &#8230; you&#8217;ll never knew it&#8217;s been there. It also knows some other stuff, but if you&#8217;re interested, all you need to do is to RTFM on the above specified link.</p>
<p>This was a real big moment. I realized that, considering the Get / Set function pairs, there had to be a <strong><a href="http://msdn.microsoft.com/en-us/library/ms633546(VS.85).aspx">SetWindowText</a></strong>. Lucky bet. I rapidly implemented the functionality and I was very proud of myself when the Windows Explorer window was calling itself as &#8220;Bond. James Bond&#8221;. I&#8217;m kidding, obviously. It was calling itself &#8220;Pop. Victor Pop&#8221;.</p>
<p>No matter the name, the function <strong><a href="http://msdn.microsoft.com/en-us/library/ms633545(VS.85).aspx">SetWindowPos</a></strong> takes care the Z-window placement, setting the top-level windows, not to mention the obvious fact that it can move / resize the window. It has been a pleasure to use this function to set a randomly picked window to be Always On Top or Always &#8230; not.</p>
<p>The rest of the code should be clear enough, but if you have any problems with it, let me know. I&#8217;ll try to play the good Samaritan, once in my life <img src="http://www.aberez.eu/wp-content/plugins/yahoo-messenger-emoticons/emoticons/big_grin.gif" style="border:none;background:none;" alt="big grin" /></p>
<p><b>Download</b>:</p>
<p>Sursa : [download id="2"]<br />
Executabil : [download id="1"]<br />
<a href="http://www.aberez.eu/images/progs/enuwind.png" target="_blank">Screenshot</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aberez.eu/en/2009/09/sa-numaram-ferestrele/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Oameni &#8230;</title>
		<link>http://www.aberez.eu/en/2009/08/oameni/</link>
		<comments>http://www.aberez.eu/en/2009/08/oameni/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 06:37:04 +0000</pubDate>
		<dc:creator>DarkByte</dc:creator>
				<category><![CDATA[Aberatii]]></category>
		<category><![CDATA[De-ale vietii]]></category>
		<category><![CDATA[Delphi]]></category>

		<guid isPermaLink="false">http://www.aberez.eu/?p=487</guid>
		<description><![CDATA[Aseară am revenit în Oradea, decis ca pe tren să-mi continui proiectele de programare care le am în curs.
În vederea acestui scop, mi-am lăsat laptopul la încărcat până în ultima clipă, apoi l-am pus în hibernare şi am plecat. Ajuns în gară, am hotărât să mă aşez în singurul locşor din tren unde există priză [...]]]></description>
			<content:encoded><![CDATA[<p>Aseară am revenit în Oradea, decis ca pe tren să-mi continui proiectele de programare care le am în curs.</p>
<p>În vederea acestui scop, mi-am lăsat laptopul la încărcat până în ultima clipă, apoi l-am pus în hibernare şi am plecat. Ajuns în gară, am hotărât să mă aşez în singurul locşor din tren unde există priză (de fapt, două alăturate &#8230; doar suntem europeni acum, nu?).</p>
<p>Am avut, totuşi, o mică surpriză, nu neapărat plăcută, când, după ce am urcat în tren, am remarcat că pe cele mai apropiate două locuri (de priză) erau două femei, una la vreo 35 de ani şi cealaltă undeva peste 50. Doar locul de dincolo de ele era gol, dar îmi displăcea profund ideea de a butona înghiontit de colegii de drum, <a href="http://www.aberez.eu/15-08-2009/feriti-a-fost-vineri-14/">cum mi s-a mai întâmplat</a>&#8230;</p>
<p>Mi-am luat inima în dinţi şi am rugat-o pe doamna mai tânără (cea care stătea chiar lângă priză), dacă se poate, să-mi doneze locul ei. Am contat pe faptul că nu avea telefon la încărcat şi nici nu părea să fie în stare  să distingă un laptop închis de o cărămidă mai interesantă.</p>
<p>După ce a trebuit să repet de câteva ori întrebarea (s-a băgat şi doamna mai în vârstă în discuţie), a fost de acord să mă lase să-mi pun telefonul la încărcat acolo &#8230; când, într-un final, a înţeles că o rugam să se mute, a făcut o mutră mai acră, dar s-a mutat, lăsându-şi totuşi bagajul să-i ţină companie trollerului meu.</p>
<p>Nu a uitat, atunci când s-a aşezat pe noul loc, să arunce o ultimă replică mai veninoasă: &#8220;Ştii, nu e frumos să ridici femeile !&#8221;. Da, ştiu, doar pe piedestal &#8230;</p>
<p>Chiar m-a blocat niţel &#8230; probabil că s-a şi văzut pe faţa mea, pentru că nu a mai adăugat nimic.</p>
<p>Tanti nu avea nici un folos pentru amărâta aia de priză, iar în acel tren doar acolo există vreo priză. Cu ce-am deranjat-o atât de tare că am rugat-o să se mute în cealaltă parte a femeii în vârstă, ţinând cont de faptul că am rugat-o frumos?</p>
<p>Cireaşa de pe tort a venit un pic mai încolo, totuşi &#8230; la prima staţie ambele femei au coborât &#8230; asta chiar m-a lăsat mască. Pentru 10 minute de călătorie s-a gândit să-mi arunce remarca aia? Sau doar pentru că era de la ţară?</p>
<p>Cred că oamenii nu se simt bine dacă nu încearcă să facă pe alţi oameni să se simtă prost &#8230; just for the fun of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aberez.eu/en/2009/08/oameni/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Calculator de bioritm</title>
		<link>http://www.aberez.eu/en/2009/08/calculator-de-bioritm/</link>
		<comments>http://www.aberez.eu/en/2009/08/calculator-de-bioritm/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 14:53:58 +0000</pubDate>
		<dc:creator>DarkByte</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[IT thingies]]></category>

		<guid isPermaLink="false">http://www.aberez.eu/?p=470</guid>
		<description><![CDATA[Destul de recent, am primit linkuri pe site-uri care-ți calculau bioritmul și afișau graficele și mi s-a părut destul de interesant, așa că &#8230; m-am apucat să-mi fac un program care să-mi afișeze bioritmul, fără să fie nevoie să intru pe vreun site sau să am măcar conexiune la Internet.
Cu toate acestea, ce trebuie să [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://www.aberez.eu/images/bio_ritm.jpg">Destul de recent, am primit linkuri pe site-uri care-ți calculau bioritmul și afișau graficele și mi s-a părut destul de interesant, așa că &#8230; m-am apucat să-mi fac un program care să-mi afișeze bioritmul, fără să fie nevoie să intru pe vreun site sau să am măcar conexiune la Internet.</p>
<p>Cu toate acestea, ce trebuie să ştiţi este că aceste cicluri bioritmice <strong>nu</strong> sunt dovedite ştiinţific, ba chiar, mai curând, infirmate. Pentru detalii, vedeţi ce zice <a href="http://en.wikipedia.org/wiki/Biorhythm">Wikipedia</a>.</p>
<p>Acestea fiind spuse, să trecem la partea tehnică și informatică din spatele acestui program.</p>
<p>Probabil că știți că pentru a desena o sinusoidală pe calculator, calculezi o serie de puncte, care le unești prin linii. O treabă foarte ușoară în Delphi. Ceea ce probabil că nu știți e faptul că există o funcție în Delphi, care unește o serie de puncte prin linii mult mai rapid decât dacă ai face o buclă, desenând liniile una câte una. Funcția se numește PolyLine (o puteți căuta în Help).</p>
<p>Mai exact, un cod de forma</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">begin</span>
   MoveTo<span style="color: #000066;">&#40;</span><span style="color: #0000ff;">0</span><span style="color: #000066;">,</span> F<span style="color: #000066;">&#40;</span><span style="color: #0000ff;">0</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
   <span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #0000ff;">1</span> <span style="color: #000000; font-weight: bold;">to</span> <span style="color: #0000ff;">100</span> <span style="color: #000000; font-weight: bold;">do</span>
      LineTo<span style="color: #000066;">&#40;</span>i<span style="color: #000066;">,</span> F<span style="color: #000066;">&#40;</span>i<span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>ar putea fi optimizat cu codul următor:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> lPoints<span style="color: #000066;">:</span> <span style="color: #000000; font-weight: bold;">array</span> <span style="color: #000000; font-weight: bold;">of</span> TPoint<span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
   <span style="color: #000066;">SetLength</span><span style="color: #000066;">&#40;</span>lPoints<span style="color: #000066;">,</span> <span style="color: #0000ff;">101</span> <span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
&nbsp;
   <span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #0000ff;">0</span> <span style="color: #000000; font-weight: bold;">to</span> <span style="color: #0000ff;">100</span> <span style="color: #000000; font-weight: bold;">do</span>
      <span style="color: #000000; font-weight: bold;">with</span> lPoints<span style="color: #000066;">&#91;</span>i<span style="color: #000066;">&#93;</span> <span style="color: #000000; font-weight: bold;">do</span>
      <span style="color: #000000; font-weight: bold;">begin</span>
         X <span style="color: #000066;">:</span><span style="color: #000066;">=</span> i<span style="color: #000066;">;</span>
         Y <span style="color: #000066;">:</span><span style="color: #000066;">=</span> F<span style="color: #000066;">&#40;</span>i<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
      <span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span>
&nbsp;
   Polyline<span style="color: #000066;">&#40;</span>lPoints<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>În afară de acest lucru, restul codului este ușor de înțeles, fiind și parțial comentat. Sursa este scrisă în Delphi 7, dar probabil că va compila și cu alte versiuni de Delphi (mai vechi sau mai noi).</p>
<p>Download : <a href="http://www.aberez.eu/codes/bioritm/bioritm_src.zip">Sursa</a> :: <a href="http://www.aberez.eu/codes/bioritm/bioritm_exe.zip">Executabil</a> :: <a href="http://www.aberez.eu/images/bioritm.png" target="_blank">Screenshot</a></p>
<p>Comentarii, bug-uri, sugestii : binevenite. Also, partea grafică a programului m-a interesat doar din punctul de vedere al graficelor, deci &#8230; știu că poate fi îmbunătățit designul.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aberez.eu/en/2009/08/calculator-de-bioritm/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Iron SRWare</title>
		<link>http://www.aberez.eu/en/2009/08/iron-srware/</link>
		<comments>http://www.aberez.eu/en/2009/08/iron-srware/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 08:46:48 +0000</pubDate>
		<dc:creator>DarkByte</dc:creator>
				<category><![CDATA[IT thingies]]></category>
		<category><![CDATA[multilanguage]]></category>

		<guid isPermaLink="false">http://www.aberez.eu/?p=444</guid>
		<description><![CDATA[SRWare Iron is a real alternative [to Chrome]. The browser is based on the Chromium-source and offers the same features as Chrome &#8211; but without the critical points that the privacy concern.
I recently found an alternative to Chrome which boasts to be on par with it, but doesn&#8217;t collect private data from users.
I use for [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>SRWare Iron is a real alternative [to Chrome]. The browser is based on the Chromium-source and offers the same features as Chrome &#8211; but without the critical points that the privacy concern.</p></blockquote>
<p>I recently found an alternative to <a href="http://www.aberez.eu/02-09-2008/google-chrome/">Chrome</a> which boasts to be on par with it, but doesn&#8217;t collect private data from users.</p>
<p><img class="alignleft" src="http://www.aberez.eu/images/ironsrware.png" alt="Iron SRWare" width="100px" />I use for more than two weeks and I can say I like it. It really does have the same capabilities as Chrome (being based on it&#8217;s source, it&#8217;s quite natural), but (and I may be wrong) it seems to move faster.</p>
<p>Go take a look, maybe you&#8217;ll like it, too.</p>
<p><a href="http://www.srware.net/en/software_srware_iron.php">SRWare Iron &#8211; The Browser of the Future</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aberez.eu/en/2009/08/iron-srware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skullboxing &#8230;</title>
		<link>http://www.aberez.eu/en/2009/06/skullboxing/</link>
		<comments>http://www.aberez.eu/en/2009/06/skullboxing/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 15:29:33 +0000</pubDate>
		<dc:creator>DarkByte</dc:creator>
				<category><![CDATA[IT thingies]]></category>
		<category><![CDATA[Opinii]]></category>

		<guid isPermaLink="false">http://www.aberez.eu/?p=161</guid>
		<description><![CDATA[Contrar aparenţelor, nu vreau să descriu vreun sport nou de contact. Nici măcar unul vechi. De fapt, singurul sport la care mă refer e cel al neuronilor supraîncărcaţi şi al degetelor care ating Mach 2. Ringul este un locşor agăţat pe Internet care găzduieşte de ceva timp o comunitate de oameni bine intenţionaţi care vor [...]]]></description>
			<content:encoded><![CDATA[<p>Contrar aparenţelor, nu vreau să descriu vreun sport nou de contact. Nici măcar unul vechi. De fapt, singurul sport la care mă refer e cel al neuronilor supraîncărcaţi şi al degetelor care ating Mach 2. Ringul este un locşor agăţat pe Internet care găzduieşte de ceva timp o comunitate de oameni bine intenţionaţi care vor să înveţe informatică, să predea altora din ceea ce ştiu şi, nu în ultimul rând, să se asigure că, indiferent de cantitatea de cunoştinţe acumulate, fiecare se va simţi @<em>home</em>.</p>
<p>La început, a fost Internetul. <span id="more-161"></span>Apoi a fost creat 3xforum.ro şi au apărut, încet, apoi din ce în ce mai rapid, comunităţi hostate pe 3xforum care erau pe placul lui <a title="The Mentor" href="http://en.wikipedia.org/wiki/Loyd_Blankenship" target="_blank">The Mentor</a> &#8230; bineînţeles, unele comunităţi au muşcat din mărul discordiei şi s-au apucat de &#8220;hecărit&#8221;, fără să înţeleagă ce înseamnă un hacker, lucru care a dus la ploile cu foc şi pucioasă din Erele Întunecate ale Internetului (ah, şi au contribuit la încetăţenirea termenului de &#8220;hacker&#8221; &#8230; bineînţeles, cu un sens niţel diametral opus decât cel original).</p>
<p>Apoi a venit potopul de forumuri care apăreau ca şi ciupercile după ploaie, care mai de care pline de oameni (mai bine zis, copii teribilişti) care visau doar deface-uri, furturi de parole si cc-uri, and so on &#8230; Cu timpul, s-au cernut câţiva oameni care au vrut să facă ceva mai bun&#8230; un loc în care să înveţi, dar să înveţi ce e bine să faci. Un loc unde muzica rock să fie la mare cinste, iar maneliştii să fie banaţi (scratch the last few words, d&#8217;oh). Un loc care să te stimuleze să înveţi, să te stimuleze să creezi &#8230; să crească Oameni, nu doar persoane care ştiu butona.</p>
<p>Am avut norocul să fiu inclus în echipa care s-a ocupat de construcţia acestui locşor şi mi-am adus şi eu contribuţia, în măsura posibilităţilor, încă de pe când se săpau şanţurile şi se puneau fundaţiile. Evident, asta e un amănunt care explică foarte clar de ce nu pot fi obiectiv vorbind despre <a title="Bitcell" href="http://www.bitcell.info" target="_blank">SkullBox</a>, fiind primul loc de pe Internet unde chiar m-am simţit ca acasă.</p>
<p>Rareori am mai căutat în alte parte informaţii legate de calculatoare şi aura de software care le înconjoară, fiindca SkullBox, pe lângă cantitatea (deja enormă) de informaţii foarte preţioase pentru cei care au nevoie de ele, dispune de o echipă de oameni inteligenţi care fac tot posibilul să răspundă oricărei întrebări (decente !) legate de prietenii noştri alimentaţi la 220V (sau 110V, după caz).</p>
<p>So, dacă ai nevoie de sfaturi legate de setările sistemului de operare sau ale site-ului tău, tutoriale de programare sau sfinte scripturi de php sau java &#8230; sau, pur şi simplu, vrei să te simţi bine, <a title="Bitcell" href="http://www.bitcell.info/board" target="_blank">SkullBox</a> merită încercat.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aberez.eu/en/2009/06/skullboxing/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Tag-cloud</title>
		<link>http://www.aberez.eu/en/2008/12/tag-cloud/</link>
		<comments>http://www.aberez.eu/en/2008/12/tag-cloud/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 12:17:31 +0000</pubDate>
		<dc:creator>DarkByte</dc:creator>
				<category><![CDATA[IT thingies]]></category>
		<category><![CDATA[multilanguage]]></category>

		<guid isPermaLink="false">http://www.aberez.eu/?p=140</guid>
		<description><![CDATA[I recently found a cute thingie, just perfect to be added to the blog. With help and assistance from misssun, I understood it and assigned it to my own interests.
I hope you like it, too.
[WP-CUMULUS]
You can find it, for the moment, in a small window, in the sidebar, displaying the categories and anothe few links [...]]]></description>
			<content:encoded><![CDATA[<p>I recently found a <a href="http://www.roytanck.com/tag-cloud/">cute thingie</a>, just perfect to be added to the blog. With help and assistance from misssun, I understood it and assigned it to my own interests.</p>
<p>I hope you like it, too.</p>
<p><center>[WP-CUMULUS]</center></p>
<p>You can find it, for the moment, in a small window, in the sidebar, displaying the categories and anothe few links that I considered to deserve this favour <img src="http://www.aberez.eu/wp-content/plugins/yahoo-messenger-emoticons/emoticons/happy.gif" style="border:none;background:none;" alt="happy" /></p>
<p>See ya later <img src="http://www.aberez.eu/wp-content/plugins/yahoo-messenger-emoticons/emoticons/winking.gif" style="border:none;background:none;" alt="winking" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aberez.eu/en/2008/12/tag-cloud/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Window Spy</title>
		<link>http://www.aberez.eu/en/2008/07/window-spy/</link>
		<comments>http://www.aberez.eu/en/2008/07/window-spy/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 12:39:54 +0000</pubDate>
		<dc:creator>DarkByte</dc:creator>
				<category><![CDATA[Delphi]]></category>

		<guid isPermaLink="false">http://www.aberez.eu/?p=21</guid>
		<description><![CDATA[Probabil că ştiţi că în Windows totul se bazează pe ferestre &#8230; era destul de evident, nu ?
Să vedem cum am putea afla câte ceva legat de ferestrele vizibile şi cum am putea să le ascundem, să le dezactivăm, etc, totul din Borland Delphi, folosind funcţii API.
Pentru început, să vedem cum aflăm ce fereastră avem [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" src="http://www.aberez.eu/images/win32api.jpg" alt="Win 32 API" />Probabil că ştiţi că în Windows totul se bazează pe ferestre &#8230; era destul de evident, nu ?</p>
<p>Să vedem cum am putea afla câte ceva legat de ferestrele vizibile şi cum am putea să le ascundem, să le dezactivăm, etc, totul din Borland Delphi, folosind funcţii API.<img class="alignright" src="http://www.aberez.eu/images/delphi7.jpg" alt="Borland Delphi 7" /></p>
<p>Pentru început, să vedem cum aflăm ce fereastră avem sub cursorul de mouse.</p>
<p>Pentru asta ne trebuie să ştim poziţia cursorului, care se poate afla folosind funcţia <strong><code>GetCursorPos</code></strong>, din care putem afla handle-ul ferestrei de sub cursor, folosind funcţia <strong><code>WindowFromPoint</code></strong>Să vedem nişte cod.</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> hWindow  <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Longint</span><span style="color: #000066;">;</span>
    P <span style="color: #000066;">:</span> TPoint<span style="color: #000066;">;</span>
  <span style="color: #000066;">...</span>
  <span style="color: #006600;">GetCursorPos</span><span style="color: #000066;">&#40;</span>P<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
&nbsp;
  hWindow <span style="color: #000066;">:</span><span style="color: #000066;">=</span> WindowFromPoint<span style="color: #000066;">&#40;</span>P<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></pre></div></div>

<p>Destul de simplu, nu ? În variabila <strong><code>hWindow</code></strong> avem acum handle-ul care ne interesează.<br />
Pentru a &#8220;vedea&#8221; în timp real ce fereastra e sub cursor, punem codul acesta într-un TTimer.</p>
<p>Să vedem cum afişăm informaţiile găsite, cum ar fi titlul ferestrei, clasa ferestrei (adică tipul componentei) şi handle-ul asociat părintelui ei, din TTimer. Pentru asta avem nevoie (în cazul acesta) de patru TEdit-uri.</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">procedure</span> TForm1<span style="color: #000066;">.</span><span style="color: #006600;">Timer1Timer</span><span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">var</span> hWindow  <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Longint</span><span style="color: #000066;">;</span>
    P <span style="color: #000066;">:</span> TPoint<span style="color: #000066;">;</span>
    buff <span style="color: #000066;">:</span> <span style="color: #000000; font-weight: bold;">Array</span><span style="color: #000066;">&#91;</span>0<span style="color: #000066;">..</span>255<span style="color: #000066;">&#93;</span> <span style="color: #000000; font-weight: bold;">of</span> <span style="color: #000066; font-weight: bold;">char</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
  GetCursorPos<span style="color: #000066;">&#40;</span>P<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
&nbsp;
  hWindow <span style="color: #000066;">:</span><span style="color: #000066;">=</span> WindowFromPoint<span style="color: #000066;">&#40;</span>P<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #ff0000;">'$'</span> <span style="color: #000066;">+</span> <span style="color: #000066;">IntToHex</span><span style="color: #000066;">&#40;</span>hWindow<span style="color: #000066;">,</span> <span style="color: #0000ff;">8</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
&nbsp;
  GetWindowText<span style="color: #000066;">&#40;</span><span style="color: #000066;">StrToInt</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">,</span> Buff<span style="color: #000066;">,</span> <span style="color: #0000ff;">255</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  Edit1<span style="color: #000066;">.</span><span style="color: #006600;">Text</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Buff<span style="color: #000066;">;</span>
&nbsp;
  GetClassName<span style="color: #000066;">&#40;</span><span style="color: #000066;">StrToInt</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">,</span> Buff<span style="color: #000066;">,</span> <span style="color: #0000ff;">255</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  Edit3<span style="color: #000066;">.</span><span style="color: #006600;">Text</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Buff<span style="color: #000066;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">If</span> GetParent<span style="color: #000066;">&#40;</span><span style="color: #000066;">StrToInt</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span> &gt; <span style="color: #0000ff;">0</span>
    <span style="color: #000000; font-weight: bold;">then</span> Edit4<span style="color: #000066;">.</span><span style="color: #006600;">Text</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #ff0000;">'$'</span> <span style="color: #000066;">+</span> <span style="color: #000066;">IntToHex</span><span style="color: #000066;">&#40;</span>GetParent<span style="color: #000066;">&#40;</span><span style="color: #000066;">StrToInt</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">8</span><span style="color: #000066;">&#41;</span>
    <span style="color: #000000; font-weight: bold;">else</span> Edit4<span style="color: #000066;">.</span><span style="color: #006600;">Text</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #ff0000;">'None'</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p><strong><code>GetWindowText</code></strong> returnează titlul ferestrei (sau textul din fereastră, dacă e vorba de un TEdit), <strong><code>GetClassName</code></strong> returnează tipul componentei, iar <strong><code>GetParent</code></strong> handle-ul părintelui. Simplu, nu ? <img src="http://www.aberez.eu/wp-content/plugins/yahoo-messenger-emoticons/emoticons/happy.gif" style="border:none;background:none;" alt="happy" /></p>
<p>Păcat că momentan tot ce aflăm sunt lucruri destul de puţin importante şi deloc atrăgătoare. Nişte numere şi ceva text care oricum se vedea şi fără un asemenea program. Să încercăm ceva mai atrăgător.</p>
<p>Pentru început vom ascunde / reafişa fereastra, apelând funcţia <strong><code>ShowWindow</code></strong>, care are nevoie de doi parametri: handle-ul ferestrei şi un parametru care specifică dacă vrem să afişăm sau să ascundem fereastra.</p>
<p>Afişare fereastră:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;">ShowWindow<span style="color: #000066;">&#40;</span>wHandle<span style="color: #000066;">,</span> SW_SHOW<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></pre></div></div>

<p>Ascundere fereastră:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;">ShowWindow<span style="color: #000066;">&#40;</span>wHandle<span style="color: #000066;">,</span> SW_HIDE<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></pre></div></div>

<p>Alt lucru care-l putem face : vom seta ca fereastra selectată să devină fereastră de top-level şi înapoi. Pentru acest lucru vom folosi funcţia <strong><code>SetWindowPos</code></strong> pentru a ne defini o procedură apelabilă cu un parametru de tip <strong><code>Boolean</code></strong> care să ştie modifica stilul ferestrei în ambele moduri, al doilea parametru fiind handle-ul ferestrei care vrem s-o modificăm.</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">procedure</span> SetTop<span style="color: #000066;">&#40;</span>Top <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Boolean</span><span style="color: #000066;">;</span> Handle <span style="color: #000066;">:</span> HWnd<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">Begin</span>
  <span style="color: #000000; font-weight: bold;">If</span> Top
    <span style="color: #000000; font-weight: bold;">Then</span>
      <span style="color: #000000; font-weight: bold;">Begin</span>
        SetWindowPos<span style="color: #000066;">&#40;</span>Handle<span style="color: #000066;">,</span> HWND_TOPMOST<span style="color: #000066;">,</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">,</span>
                     SWP_SHOWWINDOW <span style="color: #000066;">+</span> SWP_NOMOVE <span style="color: #000066;">+</span> SWP_NOSIZE<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
        SetWindowPos<span style="color: #000066;">&#40;</span>Handle<span style="color: #000066;">,</span> HWND_TOP<span style="color: #000066;">,</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">,</span>
                     SWP_SHOWWINDOW <span style="color: #000066;">+</span> SWP_NOMOVE <span style="color: #000066;">+</span> SWP_NOSIZE<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
      <span style="color: #000000; font-weight: bold;">End</span>
    <span style="color: #000000; font-weight: bold;">Else</span> SetWindowPos<span style="color: #000066;">&#40;</span>Handle<span style="color: #000066;">,</span> HWND_NOTOPMOST<span style="color: #000066;">,</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">,</span>
                      SWP_SHOWWINDOW <span style="color: #000066;">+</span> SWP_NOMOVE <span style="color: #000066;">+</span> SWP_NOSIZE<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">End</span><span style="color: #000066;">;</span></pre></div></div>

<p>Acum nu mai avem decât să apelăm procedura asta din butonul corespunzător.</p>
<p>Ştiind handle-ul ferestrei, o putem şi activa / dezactiva folosind <strong><code>EnableWindow</code></strong>, care necesită specificarea handle-ului ferestrei şi un parametru logic care determină activarea / dezactivarea ei.</p>
<p>Codul pentru cele şase butoane de până acum:</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">procedure</span> TForm1<span style="color: #000066;">.</span><span style="color: #006600;">bShowClick</span><span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
  hWindow <span style="color: #000066;">:</span><span style="color: #000066;">=</span> HexToInt<span style="color: #000066;">&#40;</span><span style="color: #000066;">Copy</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">2</span><span style="color: #000066;">,</span> <span style="color: #000066;">Length</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">-</span> <span style="color: #0000ff;">1</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  ShowWindow<span style="color: #000066;">&#40;</span>hWindow<span style="color: #000066;">,</span> SW_SHOW<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">procedure</span> TForm1<span style="color: #000066;">.</span><span style="color: #006600;">bHideClick</span><span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
  hWindow <span style="color: #000066;">:</span><span style="color: #000066;">=</span> HexToInt<span style="color: #000066;">&#40;</span><span style="color: #000066;">Copy</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">2</span><span style="color: #000066;">,</span> <span style="color: #000066;">Length</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">-</span> <span style="color: #0000ff;">1</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  ShowWindow<span style="color: #000066;">&#40;</span>hWindow<span style="color: #000066;">,</span> SW_HIDE<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">procedure</span> TForm1<span style="color: #000066;">.</span><span style="color: #006600;">bTopClick</span><span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
  hWindow <span style="color: #000066;">:</span><span style="color: #000066;">=</span> HexToInt<span style="color: #000066;">&#40;</span><span style="color: #000066;">Copy</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">2</span><span style="color: #000066;">,</span> <span style="color: #000066;">Length</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">-</span> <span style="color: #0000ff;">1</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  SetTop<span style="color: #000066;">&#40;</span><span style="color: #000000; font-weight: bold;">True</span><span style="color: #000066;">,</span> hWindow<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">procedure</span> TForm1<span style="color: #000066;">.</span><span style="color: #006600;">bPotClick</span><span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
  hWindow <span style="color: #000066;">:</span><span style="color: #000066;">=</span> HexToInt<span style="color: #000066;">&#40;</span><span style="color: #000066;">Copy</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">2</span><span style="color: #000066;">,</span> <span style="color: #000066;">Length</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">-</span> <span style="color: #0000ff;">1</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  SetTop<span style="color: #000066;">&#40;</span><span style="color: #000000; font-weight: bold;">False</span><span style="color: #000066;">,</span> hWindow<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">procedure</span> TForm1<span style="color: #000066;">.</span><span style="color: #006600;">bEnableClick</span><span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
  hWindow <span style="color: #000066;">:</span><span style="color: #000066;">=</span> HexToInt<span style="color: #000066;">&#40;</span><span style="color: #000066;">Copy</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">2</span><span style="color: #000066;">,</span> <span style="color: #000066;">Length</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">-</span> <span style="color: #0000ff;">1</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  EnableWindow<span style="color: #000066;">&#40;</span>hWindow<span style="color: #000066;">,</span> <span style="color: #000000; font-weight: bold;">True</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">procedure</span> TForm1<span style="color: #000066;">.</span><span style="color: #006600;">bDisableClick</span><span style="color: #000066;">&#40;</span>Sender<span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">TObject</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
  hWindow <span style="color: #000066;">:</span><span style="color: #000066;">=</span> HexToInt<span style="color: #000066;">&#40;</span><span style="color: #000066;">Copy</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">2</span><span style="color: #000066;">,</span> <span style="color: #000066;">Length</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">-</span> <span style="color: #0000ff;">1</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  EnableWindow<span style="color: #000066;">&#40;</span>hWindow<span style="color: #000066;">,</span> <span style="color: #000000; font-weight: bold;">False</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>Probabil că aţi remarcat linia</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;">hWindow <span style="color: #000066;">:</span><span style="color: #000066;">=</span> HexToInt<span style="color: #000066;">&#40;</span><span style="color: #000066;">Copy</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">,</span> <span style="color: #0000ff;">2</span><span style="color: #000066;">,</span> <span style="color: #000066;">Length</span><span style="color: #000066;">&#40;</span>Edit2<span style="color: #000066;">.</span><span style="color: #006600;">Text</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">-</span> <span style="color: #0000ff;">1</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></pre></div></div>

<p>, despre care nu am scos nici un cuvânt până acum. Este inversa funcţiei <strong><code>IntToHex</code></strong> din Delphi, şi este definită mai jos.</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> HexToInt<span style="color: #000066;">&#40;</span>S <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">String</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Longint</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">var</span> B <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Byte</span><span style="color: #000066;">;</span>
    C <span style="color: #000066;">:</span> <span style="color: #000066; font-weight: bold;">Char</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">Begin</span>
  Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">;</span>
  s <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000066;">UpperCase</span><span style="color: #000066;">&#40;</span>s<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
  <span style="color: #000000; font-weight: bold;">For</span> B <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #0000ff;">1</span> <span style="color: #000000; font-weight: bold;">To</span> <span style="color: #000066;">Length</span><span style="color: #000066;">&#40;</span>s<span style="color: #000066;">&#41;</span> <span style="color: #000000; font-weight: bold;">Do</span>
    <span style="color: #000000; font-weight: bold;">Begin</span>
      Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> Result <span style="color: #000066;">*</span> <span style="color: #0000ff;">16</span><span style="color: #000066;">;</span>
      c <span style="color: #000066;">:</span><span style="color: #000066;">=</span> S<span style="color: #000066;">&#91;</span>B<span style="color: #000066;">&#93;</span><span style="color: #000066;">;</span>
      <span style="color: #000000; font-weight: bold;">Case</span> c <span style="color: #000000; font-weight: bold;">Of</span>
        <span style="color: #ff0000;">'0'</span><span style="color: #000066;">..</span><span style="color: #ff0000;">'9'</span><span style="color: #000066;">:</span> <span style="color: #000066;">Inc</span><span style="color: #000066;">&#40;</span>Result<span style="color: #000066;">,</span> <span style="color: #000066;">Ord</span><span style="color: #000066;">&#40;</span>c<span style="color: #000066;">&#41;</span> <span style="color: #000066;">-</span> <span style="color: #000066;">Ord</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'0'</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
        <span style="color: #ff0000;">'A'</span><span style="color: #000066;">..</span><span style="color: #ff0000;">'F'</span><span style="color: #000066;">:</span> <span style="color: #000066;">Inc</span><span style="color: #000066;">&#40;</span>Result<span style="color: #000066;">,</span> <span style="color: #000066;">Ord</span><span style="color: #000066;">&#40;</span>c<span style="color: #000066;">&#41;</span> <span style="color: #000066;">-</span> <span style="color: #000066;">Ord</span><span style="color: #000066;">&#40;</span><span style="color: #ff0000;">'A'</span><span style="color: #000066;">&#41;</span> <span style="color: #000066;">+</span> <span style="color: #0000ff;">10</span><span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
        <span style="color: #000000; font-weight: bold;">Else</span>
          <span style="color: #000000; font-weight: bold;">Begin</span>
            Result <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #0000ff;">0</span><span style="color: #000066;">;</span>
            <span style="color: #000066;">Exit</span><span style="color: #000066;">;</span>
          <span style="color: #000000; font-weight: bold;">End</span><span style="color: #000066;">;</span>
      <span style="color: #000000; font-weight: bold;">End</span><span style="color: #000066;">;</span>
    <span style="color: #000000; font-weight: bold;">End</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">End</span><span style="color: #000066;">;</span></pre></div></div>

<p>Puteam folosi variabila <strong><code>hWindow</code></strong> ca variabilă globală şi atunci scăpam de nevoia folosirii acestei funcţii, nu ? Dar ce se întâmpla dacă la utilizarea programului se voia reafişarea unei ferestre căreia îi ştim handle-ul ? În acest fel tot ce avem de făcut este editarea celei de-a doua căsuţe text cu handle-ul respectiv şi putem face orice, altfel putând lucra doar cu ferestrele vizibile pe ecran.</p>
<p>Cam acesta ar fi codul necesar pentru o mini-aplicaţie de lucru cu ferestrele &#8230; dar stai &#8230; e o problemă &#8230; dacă verificarea ferestrei de sub mouse se face în timp real, înseamnă că &#8230; da, dacă selectez butonul de &#8220;ascundere fereastră&#8221;, îmi va ascunde tocmai respectivul buton. Damn, nu e bine.</p>
<p>Trebuie să programăm o metodă de a opri scanarea ferestrelor în timp real, o dată ce am selectat fereastra cu care vrem să lucrăm, fără să mişcăm mouse-ul. Pentru asta ne vom defini o combinaţie de taste globală, folosind funcţia <strong><code>RegisterHotKey</code></strong>, care primeşte patru parametri: handle-ul ferestrei căreia să-i trimită mesaj în caz că s-a apăsat combinaţia noastră de taste, un identificator pentru combinaţie, definit de noi, şi combinaţia de taste, definită prin doi parametri &#8211; primul, care defineşte dacă tastele CTRL, ALT, SHIFT sau WIN sunt apăsate, şi al doilea, care defineşte o tastă normală (cum ar fi &#8220;R&#8221<img src="http://www.aberez.eu/wp-content/plugins/yahoo-messenger-emoticons/emoticons/winking.gif" style="border:none;background:none;" alt="winking" />. Apelul funcţiei, pentru a ne defini combinaţia CTRL + F8, este :</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">const</span> StopKey <span style="color: #000066;">=</span> <span style="color: #0000ff;">100000</span><span style="color: #000066;">;</span>
  <span style="color: #000066;">...</span>
  <span style="color: #006600;">RegisterHotKey</span><span style="color: #000066;">&#40;</span>Handle<span style="color: #000066;">,</span> StopKey<span style="color: #000066;">,</span> MOD_CONTROL<span style="color: #000066;">,</span> VK_F8<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></pre></div></div>

<p>Această linie trebuie apelată chiar la începutul rulării programului, în <strong><code>FormCreate</code></strong>.<br />
<strong>Atenţie</strong> : <strong><code>StopKey</code></strong> este o constantă ce trebuie definită global, înaintea secţiunii <strong><code>implementation</code></strong>.</p>
<p>Pentru a fi anunţaţi când este apăsată combinaţia noastră de taste ne vom defini o procedură care să primească mesajul trimis de sistem, interceptând mesajul <strong><code>WM_HOTKEY</code></strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">type</span>
  TForm1 <span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #000066;">&#40;</span>TForm<span style="color: #000066;">&#41;</span>
  <span style="color: #000066;">...</span>
  <span style="color: #000000; font-weight: bold;">private</span>
    <span style="color: #808080; font-style: italic;">{ Private declarations }</span>
    <span style="color: #000000; font-weight: bold;">procedure</span> WMHotKey<span style="color: #000066;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> Message<span style="color: #000066;">:</span> TMessage<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span> message WM_HOTKEY<span style="color: #000066;">;</span>
 <span style="color: #000066;">...</span></pre></div></div>

<p>Codul procedurii :</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">procedure</span> TForm1<span style="color: #000066;">.</span><span style="color: #006600;">WMHotKey</span><span style="color: #000066;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> Message<span style="color: #000066;">:</span> TMessage<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">begin</span>
  <span style="color: #000000; font-weight: bold;">If</span> Message<span style="color: #000066;">.</span><span style="color: #006600;">WParam</span> <span style="color: #000066;">=</span> StopKey
    <span style="color: #000000; font-weight: bold;">Then</span> Timer1<span style="color: #000066;">.</span><span style="color: #006600;">Enabled</span> <span style="color: #000066;">:</span><span style="color: #000066;">=</span> <span style="color: #000000; font-weight: bold;">not</span> Timer1<span style="color: #000066;">.</span><span style="color: #006600;">Enabled</span><span style="color: #000066;">;</span>
<span style="color: #000000; font-weight: bold;">end</span><span style="color: #000066;">;</span></pre></div></div>

<p>Practic, la fiecare apăsare a combinaţiei, TTimer-ul nostru se va opri / reporni. Pentru a nu lăsa mizerie după rularea programului, va trebui să distrugem această combinaţie de taste la oprire. Pentru acest lucru, în <strong><code>FormCloseQuery</code></strong> vom apela :</p>

<div class="wp_syntax"><div class="code"><pre class="delphi" style="font-family:monospace;">  UnregisterHotKey<span style="color: #000066;">&#40;</span>Handle<span style="color: #000066;">,</span> StopKey<span style="color: #000066;">&#41;</span><span style="color: #000066;">;</span></pre></div></div>

<p>Cam asta ar fi tot codul.</p>
<p>Pentru a nu vă pune să lucraţi cu copy / paste şi să vă faceţi griji de componente şi asignări de evenimente, aveţi mai jos sursele şi executabilul arhivate.</p>
<p>Download : <a href="http://www.aberez.eu/codes/window_spy_src.zip">Sursa</a> :: <a href="http://www.aberez.eu/codes/window_spy_exe.zip">Executabil</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aberez.eu/en/2008/07/window-spy/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

