<?xml version="1.0" encoding="iso-8859-9" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Clomosy | Forum : Random Yer Değiştirme</title>
  <link>https://forum.clomosy.com.tr/</link>
  <description><![CDATA[XML içerik linki; Clomosy | Forum : Genel &#304;&#351;lemler : Random Yer Değiştirme]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 04 May 2026 14:39:11 +0000</pubDate>
  <lastBuildDate>Tue, 28 May 2024 10:53:44 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.07</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forum.clomosy.com.tr/RSS_post_feed.asp?TID=593</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Clomosy | Forum]]></title>
   <url>https://forum.clomosy.com.tr/forum_images/logo.png</url>
   <link>https://forum.clomosy.com.tr/</link>
  </image>
  <item>
   <title><![CDATA[Random Yer Değiştirme : Kodlar&#305;m&#305; &#246;yle yapsam da &#231;al&#305;&#351;&#305;yor...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=848#848</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=159">emre.gungor01</a><br /><strong>Konu:</strong> 593<br /><strong>Gönderim Zamanı:</strong> 28&nbsp;Mayıs&nbsp;2024 Saat 10:53<br /><br />Kodlarımı öyle yapsam da çalışıyor yani hata almıyorum sadece istediğim sonucu alamadım.&nbsp;<div><br></div><div>1.Kod;</div><div><div style=": rgb251, 251, 253;">/*</div><div style=": rgb251, 251, 253;">void randomPosition;&nbsp; &nbsp;//Random Position değiştirmesi için oluşturuldu.</div><div style=": rgb251, 251, 253;">{</div><div style=": rgb251, 251, 253;">&nbsp; btn1.Position.X = Abs((Random() * AnaForm.clWidth) - btn1.Width);</div><div style=": rgb251, 251, 253;">&nbsp; btn1.Position.Y = Abs((Random() * AnaForm.clHeight) - btn1.Height);</div><div style=": rgb251, 251, 253;">}</div><div style=": rgb251, 251, 253;">*/</div></div><div style=": rgb251, 251, 253;"><br></div><div style=": rgb251, 251, 253;">2.Kod;</div><div style=": rgb251, 251, 253;"><br></div><div style=": rgb251, 251, 253;"><div>/*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// random position için fonksiyon&nbsp;&nbsp;</div><div>&nbsp; if(sayac &gt;= 137 &amp;&amp; sayac &lt;= 155)</div><div>&nbsp; {</div><div>&nbsp; &nbsp; randomPosition();</div><div>&nbsp; }</div><div>&nbsp; */</div><div><br></div><div>Ben bunu yazdığımda sayacımın içerisindeki sayı 155'ten küçük olduğu için sürekli yer değiştiriyor. Bastığımda 1 olduğunda 2 olduğunda 3 diye gidiyor ta ki bu 155'e kadar sürekli yer değiştiriyor fakat ben 137 sayısıyla 155 sayıları arasında random yer değiştirmesini istemiştim.</div></div>]]>
   </description>
   <pubDate>Tue, 28 May 2024 10:53:44 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=848#848</guid>
  </item> 
  <item>
   <title><![CDATA[Random Yer Değiştirme : Merhaba EmreAld&#305;&#287;&#305;n hatan&#305;n resmini...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=846#846</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=106">Developer</a><br /><strong>Konu:</strong> 593<br /><strong>Gönderim Zamanı:</strong> 27&nbsp;Mayıs&nbsp;2024 Saat 17:54<br /><br />Merhaba Emre&nbsp;<div>Aldığın hatanın resmini atar mısın&nbsp;</div><div><br></div>]]>
   </description>
   <pubDate>Mon, 27 May 2024 17:54:25 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=846#846</guid>
  </item> 
  <item>
   <title><![CDATA[Random Yer Değiştirme : Merhabalar;Kod yazd&#305;m fakat &#231;al&#305;&#351;m&#305;yor...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=835#835</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=159">emre.gungor01</a><br /><strong>Konu:</strong> 593<br /><strong>Gönderim Zamanı:</strong> 25&nbsp;Mayıs&nbsp;2024 Saat 12:52<br /><br />Merhabalar;<div>Kod yazdım fakat çalışmıyor hatayı da tam çözemedim. Yardımcı olabilir misiniz?</div><div><br></div><div>Kodlar;</div><div><br></div><div><div>Var</div><div>&nbsp; AnaForm:TclForm;&nbsp;&nbsp;</div><div>&nbsp; btn1 : TClProButton;</div><div>&nbsp; Zaman : TCLTimer;</div><div>&nbsp; sayac:Integer;</div><div>&nbsp;&nbsp;</div><div>&nbsp; RndmTimer: TClTimer;</div><div>&nbsp; colorArray : array of String;</div><div>&nbsp;&nbsp;</div><div>&nbsp; oyunzaman:TCLTimer;</div><div>&nbsp; sayac1:Integer;</div><div>&nbsp; lblTimer: TCLLabel;</div><div>&nbsp;&nbsp;</div><div>&nbsp; testImg: TCLImage;&nbsp; //random yerlerde belirli zamanda görsel çıkartıyor. //EKSURE İÇİN KULLANDIM.</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp;</div><div>void randomColor;</div><div>var</div><div>&nbsp; randmDeger: Integer;</div><div>{</div><div>&nbsp; colorArray = &#091;'#26cf3a','#ff780a','#9a7de8','#813b3b','#a664c4','#6492c4','#81c464'&#093;;</div><div>&nbsp; randmDeger =&nbsp; clMath.GenerateRandom(0,6);</div><div>&nbsp; AnaForm.SetFormColor(colorArray&#091;randmDeger&#093;,'',clGNone);</div><div>}</div><div><br></div><div>/*</div><div>void randomPosition;&nbsp; &nbsp;//Random Position değiştirmesi için oluşturuldu.</div><div>{</div><div>&nbsp; btn1.Position.X = Abs((Random() * AnaForm.clWidth) - btn1.Width);</div><div>&nbsp; btn1.Position.Y = Abs((Random() * AnaForm.clHeight) - btn1.Height);</div><div>}</div><div>*/</div><div><br></div><div>void eksure&nbsp; &nbsp;//Ekranın ortasındaki sayı 25 veya büyük olunca çıkması için yapıldı.</div><div>{</div><div>&nbsp; if(IntToStr(btn1.Text) &gt; 25)</div><div>&nbsp; {</div><div>&nbsp; testImg.visible=False;</div><div>&nbsp; sayac1 = sayac1+5;</div><div>&nbsp; }</div><div>}</div><div><br></div><div>void zamanlayici;</div><div>{</div><div>&nbsp;&nbsp;</div><div>&nbsp; &nbsp; if (sayac &gt;= 100)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; RndmTimer.Enabled = True;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; btn1.Text = IntToStr(sayac);</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp;</div><div>&nbsp; sayac = sayac + 1;</div><div>&nbsp; oyunzaman.Enabled=True;</div><div>&nbsp; btn1.Text = IntToStr(sayac);</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp;</div><div>&nbsp; if(sayac == 25)</div><div>&nbsp; {</div><div>&nbsp; &nbsp; AnaForm.SetFormColor('#23c7c5','',clGNone);</div><div>&nbsp; &nbsp; sayac1 = sayac1 + 3;</div><div>&nbsp; &nbsp; btn1.Position.X = Abs((Random() * AnaForm.clWidth) - btn1.Width);</div><div>&nbsp; &nbsp; btn1.Position.Y = Abs((Random() * AnaForm.clHeight) - btn1.Height);</div><div>&nbsp; &nbsp; testImg.Position.X = Abs((Random() * AnaForm.clWidth) - testImg.Width);</div><div>&nbsp; &nbsp; testImg.Position.Y = Abs((Random() * AnaForm.clHeight) - testImg.Height);</div><div>&nbsp; &nbsp; testImg.visible=True;</div><div>&nbsp; }</div><div>&nbsp;&nbsp;</div><div>&nbsp; if(sayac == 72)</div><div>&nbsp; {</div><div>&nbsp; &nbsp; AnaForm.SetFormColor('#e01f1f','',clGNone);</div><div>&nbsp; &nbsp; sayac1 = sayac1 + 5;</div><div>&nbsp; &nbsp; btn1.Position.X = Abs((Random() * AnaForm.clWidth) - btn1.Width);</div><div>&nbsp; &nbsp; btn1.Position.Y = Abs((Random() * AnaForm.clHeight) - btn1.Height);</div><div>&nbsp; &nbsp; testImg.Position.X = Abs((Random() * AnaForm.clWidth) - testImg.Width);</div><div>&nbsp; &nbsp; testImg.Position.Y = Abs((Random() * AnaForm.clHeight) - testImg.Height);</div><div>&nbsp; &nbsp; testImg.visible=True;</div><div>&nbsp; }</div><div>&nbsp;&nbsp;</div><div>&nbsp; if(sayac == 100)</div><div>&nbsp; {</div><div>&nbsp; &nbsp; AnaForm.SetFormColor('#cfeb00','#db7edd',clGHorizontal);</div><div>&nbsp; &nbsp; sayac1 = sayac1 + 7;</div><div>&nbsp; &nbsp; btn1.Position.X = Abs((Random() * AnaForm.clWidth) - btn1.Width);</div><div>&nbsp; &nbsp; btn1.Position.Y = Abs((Random() * AnaForm.clHeight) - btn1.Height);</div><div>&nbsp; &nbsp; testImg.Position.X = Abs((Random() * AnaForm.clWidth) - testImg.Width);</div><div>&nbsp; &nbsp; testImg.Position.Y = Abs((Random() * AnaForm.clHeight) - testImg.Height);</div><div>&nbsp; &nbsp; testImg.visible=True;</div><div>&nbsp; }</div><div>&nbsp; //1.</div><div>&nbsp; if (sayac &gt;= 127)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; AnaForm.SetFormColor('#ffae00','',clGNone);</div><div>&nbsp; &nbsp; &nbsp; randomPosition();</div><div>&nbsp; &nbsp; &nbsp; RndmTimer.Enabled = False;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; btn1.Text = IntToStr(sayac);</div><div>&nbsp; //2.</div><div>&nbsp; &nbsp;if (sayac == 134)&nbsp;</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; RndmTimer.Enabled = True;</div><div>&nbsp; &nbsp; &nbsp; randomPosition();</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; btn1.Text = IntToStr(sayac);</div><div>&nbsp; //3.&nbsp;&nbsp;</div><div>&nbsp; /*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// random position için fonksiyon&nbsp;&nbsp;</div><div>&nbsp; if(sayac &gt;= 137 &amp;&amp; sayac &lt;= 155)</div><div>&nbsp; {</div><div>&nbsp; &nbsp; randomPosition();</div><div>&nbsp; }</div><div>&nbsp; */</div><div>&nbsp; //4.</div><div>&nbsp; &nbsp; if (sayac &gt;= 156)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; AnaForm.SetFormColor('#16cce3','',clGNone);</div><div>&nbsp; &nbsp; &nbsp; RndmTimer.Enabled = False;</div><div>&nbsp; &nbsp; }</div><div>&nbsp; &nbsp; btn1.Text = IntToStr(sayac);</div><div>}</div></div><div><br></div><div>Burada bulunan yorum satırları içerisine aldığım (/*&nbsp; */) yerlerde void randomPosition; diye parametre atadım ve kod bloğunda ise&nbsp;if(sayac &gt;= 137 &amp;&amp; sayac &lt;= 155)&nbsp; bunu yazdım benim ortadaki sayacım sürekli 155'ten küçük olduğu içinde random olarak yer değiştiriyor, fakat ben sadece 137 sayısıyla 155 sayıları arasında random olarak yer değiştirmesini istiyorum kopyala yapıştır yaparak yer değiştirebilirdim fakat daha kolay olması ve yer kaplamaması adına void randomPosition; parametresini oluşturdum. Sizce nasıl yapabilirim?</div>]]>
   </description>
   <pubDate>Sat, 25 May 2024 12:52:02 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=835#835</guid>
  </item> 
  <item>
   <title><![CDATA[Random Yer Değiştirme : Te&#351;ekk&#252;r ederim sorunum &#231;&#246;z&#252;ld&#252;...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=814#814</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=159">emre.gungor01</a><br /><strong>Konu:</strong> 593<br /><strong>Gönderim Zamanı:</strong> 14&nbsp;Mayıs&nbsp;2024 Saat 10:47<br /><br />Teşekkür ederim sorunum çözüldü ve açıklamayı güzel yaptığınız için ayrı teşekkür ederim sade ve anlaşılır.]]>
   </description>
   <pubDate>Tue, 14 May 2024 10:47:13 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=814#814</guid>
  </item> 
  <item>
   <title><![CDATA[Random Yer Değiştirme : Merhaba Emre,Bu sorunu &#231;&#246;zebilmemiz...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=813#813</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=142">BilalCndn</a><br /><strong>Konu:</strong> 593<br /><strong>Gönderim Zamanı:</strong> 14&nbsp;Mayıs&nbsp;2024 Saat 09:59<br /><br />Merhaba Emre,<div><br></div><div>Bu sorunu çözebilmemiz için öncelikle nesnelerin pozisyonlarının nasıl çalıştığını anlamalıyız.<br><img src="uploads/142/1.jpg" height="680" width="1053" border="0" /><br></div><div>Görselde gördüğün gibi bir formun sol üst köşesi (0x0) pozisyonunda oluyor. Sağ üst köşesi (formun genişliği x 0) sol alt köşesi (0 x formun yüksekliği) sağ alt köşesi ise (formun genişliği x formun yüksekliği) oluyor. Aynı durum görsel nesneler için de geçerli. Bu durumda dairenin konumunu sol üst köşesine göre alıyoruz. Şimdi taşma durumlarını inceleyelim.</div><div><img src="uploads/142/2.jpg" height="718" width="1158" border="0" />&nbsp;</div><div><br></div><div>Görselde gördüğün gibi nesnenin pozisyonu formun sınırları dahilinde olmasına rağmen nesne bir miktar formun dışında kalabiliyor. Şimdi senin kodun üzerinde bu duruma çözüm getirelim.<br><br><table width="99%"><tr><td><pre class="BBcode">&nbsp; &nbsp;btn1.Position.X = Abs((Random() * AnaForm.clWidth) - btn1.Width);</div><div>&nbsp; btn1.Position.Y = Abs((Random() * AnaForm.clHeight) - btn1.Height);</pre></td></tr></table></div><div><br></div><div>Bu kodda form sınırları dahilinde olacak şekilde bir random sayı üretiyoruz.(Bu kısmı daha önce yapmıştık zaten)<br>Ürettiğimiz sayıdan nesnenin uzunluğunu çıkarıyoruz. Bu durum bizim için sağdan ve alttan taşmaları önlüyor. Fakat random sayı nesnenin uzunluğundan düşük bir sayı gelirse bu sefer pozisyon negatif olacağı için soldan ya da üstten taşmalar olacaktır. Bu durumu düzeltmek için de çıkan sayıyı 'Abs' fonksiyonu içerisine alıyoruz. 'Abs' fonksiyonu sayının mutlak değerini aldığı için negatif bir sayı çıkma ihtimali de ortadan kalkıyor. Bu şekilde nesnenin formun dışına taşmasını da engellemiş oluyoruz.</div><div><br></div><div>Sorunun çözüme ulaşıp ulaşmadığı ile ilgili geri dönüşünü bekliyorum.</div><div>İyi çalışmalar diliyorum.</div>]]>
   </description>
   <pubDate>Tue, 14 May 2024 09:59:50 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=813#813</guid>
  </item> 
  <item>
   <title><![CDATA[Random Yer Değiştirme : evet i&#351;ime yarad&#305; fakat ta&#351;ma...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=811#811</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=159">emre.gungor01</a><br /><strong>Konu:</strong> 593<br /><strong>Gönderim Zamanı:</strong> 13&nbsp;Mayıs&nbsp;2024 Saat 22:46<br /><br />evet işime yaradı fakat taşma sorununu bulamadım.]]>
   </description>
   <pubDate>Mon, 13 May 2024 22:46:56 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=811#811</guid>
  </item> 
  <item>
   <title><![CDATA[Random Yer Değiştirme : Merhaba Emre,Dok&#252;man sayfas&#305;ndan...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=808#808</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=142">BilalCndn</a><br /><strong>Konu:</strong> 593<br /><strong>Gönderim Zamanı:</strong> 13&nbsp;Mayıs&nbsp;2024 Saat 09:59<br /><br />Merhaba Emre,<div><br></div><div>Doküman sayfasından (<a href="https://www.docs.clomosy.com/index.php/Random" target="_blank" rel="nofollow">https://www.docs.clomosy.com/index.php/Random</a>) random hakkında bilgi sahibi olabilirsin. Koda gelecek olursak öncelikle bir nesneye 'Align' özelliği verdiğin zaman o nesneyi sabitlemiş oluyorsun. Butonun da 'Align' özelliğine 'alCenter' ataması yaptığınızda butonu bulunduğu nesnenin merkezine sabitlemiş oluyorsunuz. Bu durum butonun pozisyonunu manuel olarak değiştirmenize engel oluyor. Pozisyonda değişiklik yapabilmek için 'Align' özelliğine 'alNone' ataması yapmalısınız. Artık butonu hareket ettirebildiğimize göre gelelim 'Random' konusuna. Clomosy'de 'Random' özelliği 0 ile 1 arasında rastgele bir sayı üretir. Yani siz 0 ile 100 arasında bir sayı üretmesini istiyorsanız 'Random' özelliğini 100 ile çarpmalısınız. Kodunda yaptığım düzenlemelerde formun boyutları ile çarptım. Bu durumda nesne form içerisinde rasgele bir konuma gelebilecek. Fakat nesnenin bir kısmının form dışına çıkma ihtimali var. Bu problemin çözümünü sana bıraktım ama çözemezsen sormaktan çekinme. Ayrıca nesnenin 'Align' özelliğini 'alNone' olarak belirlediğimiz için başlangıç pozisyonunu senin istediğin gibi ortalamak istedim. Bu kod da sana az önce bahsettiğim problemin çözümü için ipucu olmuş olacak.<br><br>Kodun düzenlenmiş hali:</div><div><table width="99%"><tr><td><pre class="BBcode">Var</div><div>&nbsp; AnaForm:TclForm;</div><div>&nbsp; btn1 : TClProButton;</div><div>&nbsp; Zaman : TCLTimer;</div><div>&nbsp; sayac:Integer;</div><div>&nbsp;&nbsp;</div><div>&nbsp; Zaman2:TCLTimer;</div><div>&nbsp; sayac1:Integer;</div><div>&nbsp; lblTimer: TCLLabel;</div><div>&nbsp;&nbsp;</div><div>void zamanlayici;</div><div>{</div><div>&nbsp; if(sayac == sayac)</div><div>&nbsp; {</div><div>&nbsp; sayac = sayac + 1;</div><div>&nbsp; Zaman.Enabled = False;</div><div>&nbsp; btn1.Text = IntToStr(sayac);</div><div>&nbsp; if(sayac == 25)</div><div>&nbsp; {</div><div>&nbsp; AnaForm.SetFormColor('#23c7c5','',clGNone);</div><div>&nbsp; sayac1 = sayac1 + 3;</div><div><font color="#ff0000">&nbsp; btn1.Position.X = Random() * AnaForm.clWidth;</font></div><div><font color="#ff0000">&nbsp; btn1.Position.Y = Random() * AnaForm.clHeight;</font></div><div>&nbsp; }</div><div>&nbsp; }</div><div>&nbsp; else</div><div>&nbsp; {</div><div>&nbsp; btn1.Text = IntToStr(sayac);</div><div>&nbsp; sayac = sayac + 1;</div><div>&nbsp; }</div><div>}</div><div><br></div><div>void sure;</div><div>{</div><div>&nbsp;&nbsp;</div><div>&nbsp; if(sayac1 == 0)</div><div>&nbsp; {</div><div>&nbsp; &nbsp; Zaman2.Enabled = False;</div><div>&nbsp; &nbsp; lblTimer.caption = IntToStr(sayac1);</div><div>&nbsp; &nbsp; ShowMessage('Süreniz Doldu!');</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp; if(btn1 == 2)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; Zaman2.Enabled= False;</div><div>&nbsp; &nbsp; lblTimer.caption = IntToStr(sayac1);</div><div>&nbsp; &nbsp; }</div><div>&nbsp; }</div><div>&nbsp; else</div><div>&nbsp; {</div><div>&nbsp; &nbsp; lblTimer.caption=IntToStr(sayac1);</div><div>&nbsp; &nbsp; Dec(sayac1);</div><div>&nbsp; }</div><div>}</div><div><br></div><div>&nbsp;{</div><div>&nbsp; &nbsp;sayac=0;</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp;sayac1=20;</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp;AnaForm = TclForm.Create(Self);</div><div>&nbsp; &nbsp;</div><div>&nbsp; Zaman= AnaForm.AddNewTimer(AnaForm,'Zaman',1000);</div><div>&nbsp; Zaman.Enabled = True;</div><div>&nbsp; AnaForm.AddNewEvent(Zaman,tbeOnTimer,'zamanlayici');</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp;</div><div>&nbsp; Zaman2=AnaForm.AddNewTimer(AnaForm,'Zaman2',1000);</div><div>&nbsp; Zaman2.Enabled=True;</div><div>&nbsp; AnaForm.AddNewEvent(Zaman2,tbeOnTimer,'sure');</div><div>&nbsp;&nbsp;</div><div>&nbsp; lblTimer=AnaForm.AddNewLabel(AnaForm,'lblTimer','');</div><div>&nbsp; lblTimer.StyledSettings = ssFamily;</div><div>&nbsp; lblTimer.TextSettings.Font.Size = 35;</div><div>&nbsp; lblTimer.Align = alTop;</div><div>&nbsp; lblTimer.Height=50;</div><div>&nbsp; lblTimer.Width=50;</div><div>&nbsp; lblTimer.Margins.Left = 170;</div><div>&nbsp;</div><div>&nbsp; &nbsp;AnaForm.SetFormColor('#52504d','',clGNone);&nbsp;</div><div>&nbsp; &nbsp;btn1 = AnaForm.AddNewProButton(AnaForm,'btn1','SAYAC');</div><div><font color="#ff0000">&nbsp; &nbsp;btn1.Align = alNone;</font></div><div>&nbsp; &nbsp;btn1.Width = 100;</div><div>&nbsp; &nbsp;btn1.Height = 100;</div><div><font color="#ff0000">&nbsp; &nbsp;btn1.Position.X = (AnaForm.clWidth / 2) - (btn1.Width / 2);</font></div><div><font color="#ff0000">&nbsp; &nbsp;btn1.Position.Y = (AnaForm.clHeight / 2) - (btn1.Width / 2); // konum.</font></div><div>&nbsp; &nbsp;btn1.clProSettings.BorderColor = clAlphaColor.clHexToColor('#a0a3b1');</div><div>&nbsp; &nbsp;btn1.clProSettings.FontColor = clAlphaColor.clHexToColor('#050505');</div><div>&nbsp; &nbsp;btn1.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#ffffff');</div><div>&nbsp; &nbsp;btn1.clProSettings.IsTransparent = False;</div><div>&nbsp; &nbsp;btn1.clProSettings.FontSize = 12;</div><div>&nbsp; &nbsp;btn1.clProSettings.FontVertAlign = palcenter;//palLeading , palCenter , palTrailing</div><div>&nbsp; &nbsp;btn1.clProSettings.FontHorzAlign = palCenter;</div><div>&nbsp; &nbsp;btn1.clProSettings.IsFill = True;&nbsp;</div><div>&nbsp; &nbsp;btn1.clProSettings.IsRound = True;</div><div>&nbsp; &nbsp;btn1.clProSettings.RoundHeight = 50;</div><div>&nbsp; &nbsp;btn1.clProSettings.RoundWidth = 50;</div><div>&nbsp; &nbsp;btn1.clProSettings.BorderWidth = 3;</div><div>&nbsp; &nbsp;btn1.SetclProSettings(btn1.clProSettings);</div><div><br></div><div>&nbsp; &nbsp;AnaForm.AddNewEvent(btn1,tbeOnClick,'zamanlayici');</div><div>&nbsp; &nbsp;AnaForm.AddNewEvent(lblTimer,tbeOnClick,'sure');</div><div>&nbsp; &nbsp;AnaForm.Run;</div><div>&nbsp;</div><div>&nbsp;}</pre></td></tr></table></div><div><br></div><div><div style=": rgb251, 251, 253;">Sorunun çözüme ulaşıp ulaşmadığı ile ilgili geri dönüşünü bekliyorum.</div><div style=": rgb251, 251, 253;">İyi çalışmalar diliyorum.</div></div>]]>
   </description>
   <pubDate>Mon, 13 May 2024 09:59:42 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=808#808</guid>
  </item> 
  <item>
   <title><![CDATA[Random Yer Değiştirme : Merhabalar;Clomosy Kitap&amp;#039;tan...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=806#806</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=159">emre.gungor01</a><br /><strong>Konu:</strong> 593<br /><strong>Gönderim Zamanı:</strong> 12&nbsp;Mayıs&nbsp;2024 Saat 18:18<br /><br />Merhabalar;<div><br></div><div>Clomosy Kitap'tan ve github kodlarından bakmaya çalıştım fakat bir bilgi sahibi olamadım projemde orta noktada bulunan yuvarlağımı içindeki label bastığımda 25 olunca ekranda random bir yere atamasını istiyorum fakat nasıl yapacağım hakkında bir şey bulamadım;</div><div><br></div><div>kodlar;</div><div><br></div><div><div>Var</div><div>&nbsp; AnaForm:TclForm;</div><div>&nbsp; btn1 : TClProButton;</div><div>&nbsp; Zaman : TCLTimer;</div><div>&nbsp; sayac:Integer;</div><div>&nbsp;&nbsp;</div><div>&nbsp; Zaman2:TCLTimer;</div><div>&nbsp; sayac1:Integer;</div><div>&nbsp; lblTimer: TCLLabel;</div><div>&nbsp;&nbsp;</div><div>void zamanlayici;</div><div>{</div><div>&nbsp; if(sayac == sayac)</div><div>&nbsp; {</div><div>&nbsp; sayac = sayac + 1;</div><div>&nbsp; Zaman.Enabled = False;</div><div>&nbsp; btn1.Text = IntToStr(sayac);</div><div>&nbsp; if(sayac == 25)</div><div>&nbsp; {</div><div>&nbsp; AnaForm.SetFormColor('#23c7c5','',clGNone);</div><div>&nbsp; sayac1 = sayac1 + 3;</div><div>&nbsp;&nbsp;</div><div>&nbsp; btn1.Position.Y = btn1.Position.Y + 30;&nbsp; //KONUM</div><div>&nbsp; }</div><div>&nbsp; }</div><div>&nbsp; else</div><div>&nbsp; {</div><div>&nbsp; btn1.Text = IntToStr(sayac);</div><div>&nbsp; sayac = sayac + 1;</div><div>&nbsp; }</div><div>}</div><div><br></div><div>void sure;</div><div>{</div><div>&nbsp;&nbsp;</div><div>&nbsp; if(sayac1 == 0)</div><div>&nbsp; {</div><div>&nbsp; &nbsp; Zaman2.Enabled = False;</div><div>&nbsp; &nbsp; lblTimer.caption = IntToStr(sayac1);</div><div>&nbsp; &nbsp; ShowMessage('Süreniz Doldu!');</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp; if(btn1 == 2)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; Zaman2.Enabled= False;</div><div>&nbsp; &nbsp; lblTimer.caption = IntToStr(sayac1);</div><div>&nbsp; &nbsp; }</div><div>&nbsp; }</div><div>&nbsp; else</div><div>&nbsp; {</div><div>&nbsp; &nbsp; lblTimer.caption=IntToStr(sayac1);</div><div>&nbsp; &nbsp; Dec(sayac1);</div><div>&nbsp; }</div><div>}</div><div><br></div><div>&nbsp;{</div><div>&nbsp; &nbsp;sayac=0;</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp;sayac1=20;</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp;AnaForm = TclForm.Create(Self);</div><div>&nbsp; &nbsp;</div><div>&nbsp; Zaman= AnaForm.AddNewTimer(AnaForm,'Zaman',1000);</div><div>&nbsp; Zaman.Enabled = True;</div><div>&nbsp; AnaForm.AddNewEvent(Zaman,tbeOnTimer,'zamanlayici');</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp;</div><div>&nbsp; Zaman2=AnaForm.AddNewTimer(AnaForm,'Zaman2',1000);</div><div>&nbsp; Zaman2.Enabled=True;</div><div>&nbsp; AnaForm.AddNewEvent(Zaman2,tbeOnTimer,'sure');</div><div>&nbsp;&nbsp;</div><div>&nbsp; lblTimer=AnaForm.AddNewLabel(AnaForm,'lblTimer','');</div><div>&nbsp; lblTimer.StyledSettings = ssFamily;</div><div>&nbsp; lblTimer.TextSettings.Font.Size = 35;</div><div>&nbsp; lblTimer.Align = alTop;</div><div>&nbsp; lblTimer.Height=50;</div><div>&nbsp; lblTimer.Width=50;</div><div>&nbsp; lblTimer.Margins.Left = 170;</div><div>&nbsp;</div><div>&nbsp; &nbsp;AnaForm.SetFormColor('#52504d','',clGNone);&nbsp;</div><div>&nbsp; &nbsp;btn1 = AnaForm.AddNewProButton(AnaForm,'btn1','SAYAC');</div><div>&nbsp; &nbsp;btn1.Align = alCenter;</div><div>&nbsp; &nbsp;btn1.Position.Y=0; // konum.</div><div>&nbsp; &nbsp;btn1.Width = 100;</div><div>&nbsp; &nbsp;btn1.Height = 100;</div><div>&nbsp; &nbsp;btn1.clProSettings.BorderColor = clAlphaColor.clHexToColor('#a0a3b1');</div><div>&nbsp; &nbsp;btn1.clProSettings.FontColor = clAlphaColor.clHexToColor('#050505');</div><div>&nbsp; &nbsp;btn1.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#ffffff');</div><div>&nbsp; &nbsp;btn1.clProSettings.IsTransparent = False;</div><div>&nbsp; &nbsp;btn1.clProSettings.FontSize = 12;</div><div>&nbsp; &nbsp;btn1.clProSettings.FontVertAlign = palcenter;//palLeading , palCenter , palTrailing</div><div>&nbsp; &nbsp;btn1.clProSettings.FontHorzAlign = palCenter;</div><div>&nbsp; &nbsp;btn1.clProSettings.IsFill = True;&nbsp;</div><div>&nbsp; &nbsp;btn1.clProSettings.IsRound = True;</div><div>&nbsp; &nbsp;btn1.clProSettings.RoundHeight = 50;</div><div>&nbsp; &nbsp;btn1.clProSettings.RoundWidth = 50;</div><div>&nbsp; &nbsp;btn1.clProSettings.BorderWidth = 3;</div><div>&nbsp; &nbsp;btn1.SetclProSettings(btn1.clProSettings);</div><div><br></div><div>&nbsp; &nbsp;AnaForm.AddNewEvent(btn1,tbeOnClick,'zamanlayici');</div><div>&nbsp; &nbsp;AnaForm.AddNewEvent(lblTimer,tbeOnClick,'sure');</div><div>&nbsp; &nbsp;AnaForm.Run;</div><div>&nbsp;</div><div>&nbsp;}</div></div><div><br></div>]]>
   </description>
   <pubDate>Sun, 12 May 2024 18:18:27 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=593&amp;PID=806#806</guid>
  </item> 
 </channel>
</rss>