Programlama | Programlama Dilleri | C Programlama Dili |C++

Hata
  • XML Parsing Error at 1:82. Error 9: Invalid character


Ev Çizme Program?

Bu Program C++ Builder 6 ile uyumludur.

AÇIKLAMA

Bu program verilen parametlere ba?l? olarak ev çizdirir yada rastgele bir ?ekilde belirli parametlerle kendi bir ev çizer.

Program?n Tamam?n? A?a??daki Linkten ?ndirebilirsiniz

Linki Görebilmeniz ?çin Üye Olman?z Gerekmektedir...

Üye Kay?t

Program Kodu:

  1.  
  2. //---------------------------------------------------------------------------
  3.  
  4. #include <vcl.h>
  5. #pragma hdrstop
  6.  
  7. #include "Unit1.h"
  8. //---------------------------------------------------------------------------
  9. #pragma package(smart_init)
  10. #pragma resource "*.dfm"
  11. TForm1 *Form1;
  12. int x,y,w,h;
  13. //---------------------------------------------------------------------------
  14. __fastcall TForm1::TForm1(TComponent* Owner)
  15.         : TForm(Owner)
  16. {
  17. }
  18. //---------------------------------------------------------------------------
  19. void evciz(int x,int y,int h,int w)
  20. {
  21. int ortax;
  22. const catiyuk=3;
  23. const Kapigen=5;
  24. const kapiyuk=2;
  25. ortax=x+w/2;
  26. Form1->Canvas->Rectangle(x,y,x+w,y-h);
  27. Form1->Canvas->MoveTo(x,y-h);
  28. Form1->Canvas->LineTo(ortax,y-h-h/catiyuk);
  29. Form1->Canvas->LineTo(x+w,y-h);
  30. Form1->Canvas->Rectangle(ortax-w/Kapigen,y,ortax+(w/Kapigen),y-h/kapiyuk);
  31. Form1->Canvas->MoveTo(ortax,y);
  32. Form1->Canvas->LineTo(ortax,y-h/kapiyuk);
  33. }
  34. //---------------------------------------------------------------------------
  35. void __fastcall TForm1::Button1Click(TObject *Sender)
  36. {
  37. if((Edit1->Text!="")&&(Edit2->Text!="")&&(Edit3->Text!="")&&(Edit4->Text!=""))
  38. {
  39. x=StrToInt(Edit1->Text);
  40. y=StrToInt(Edit2->Text);
  41. h=StrToInt(Edit3->Text);
  42. w=StrToInt(Edit4->Text);
  43. evciz(x,y,w,h);
  44. }
  45. else
  46. Application->MessageBox("Lütfen Bütün Alanlar? Doldurunuz","UYARI",MB_ICONINFORMATION);
  47. }
  48. //---------------------------------------------------------------------------
  49.  
  50. void __fastcall TForm1::Button2Click(TObject *Sender)
  51. {
  52. randomize();
  53. x=random(Form1->Width);
  54. y=random(Form1->Height);
  55. w=random(Form1->Width)/2;
  56. h=random(Form1->Height)/2;
  57. evciz(x,y,w,h);
  58. }
  59. //---------------------------------------------------------------------------
  60.  
  61.  
  62.  

Yorumlar (0)
Sadece kayıtlı kullanıcılar yorum yazabilir!
Son Güncelleme ( Perşembe, 07 Nisan 2011 23:33 )  
404 Not Found

404

Not Found

The resource requested could not be found on this server!


Proudly powered by LiteSpeed Web Server

Please be advised that LiteSpeed Technologies Inc. is not a web hosting company and, as such, has no control over content found on this site.