bloknot dasturi

DOCX 9 pages 2.0 MB Free download

Page preview (5 pages)

Scroll down 👇
1 / 9
2-dedline. bloknot dasturini tayyorlash. men bloknot dasturini tayyorlash uchun c++ builder dasturlash muhitining rad studio xe3 versiyasidan foydalandim. c++ builderda yangi loyiha yaratamiz: dastlab bloknot dasturini interfeysini yaratib olamiz. dastlab formaga mainmenu komponentasini menyular hosil qilish uchun joylashtiramiz: so’ng mainmenu komponentasi orqali quyidagi, “fayl,tahrirlash,shrift,ma’lumotlar” kabi menyularni yaratib oldim: undan keyin yozgan ma’lumotlar ustida tahrirlashlar bajarish uchun fontdialog, ma’lumotlar yozish uchun memo1,ularni saqlash uchun savedialog,kiritgan o’zgarishlarni saqlash uchun esa opendialog komponentalarini yaratib oldim. va bizning blacnotimiz tayyor holatga keldi: dastur kodi: //--------------------------------------------------------------------------- #include #pragma hdrstop #include "unit1.h" #include "unit2.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" tform1 *form1; ansistring filename = "yangi hujjat"; //--------------------------------------------------------------------------- __fastcall tform1::tform1(tcomponent* owner) : tform(owner) { } //--------------------------------------------------------------------------- void __fastcall tform1::shrift2click(tobject *sender) { fontdialog1->font = memo1->font; if (fontdialog1->execute()); memo1->font = fontdialog1->font; } //--------------------------------------------------------------------------- void __fastcall tform1::nusxaolish1click(tobject *sender) { memo1->copytoclipboard(); } //--------------------------------------------------------------------------- void __fastcall tform1::qirqibolish1click(tobject *sender) { memo1->cuttoclipboard(); } //--------------------------------------------------------------------------- void __fastcall tform1::barchasinibelgilash1click(tobject *sender) { memo1->selectall(); } //---------------------------------------------------------------------
2 / 9
------ void __fastcall tform1::joylashtirish1click(tobject *sender) { memo1->pastefromclipboard(); } //--------------------------------------------------------------------------- void __fastcall tform1::kabisaqlash1click(tobject *sender) { if (savedialog1->execute());{ filename = savedialog1->filename + ".txt"; memo1->lines->savetofile(filename); caption = extractfilename(filename); } } //--------------------------------------------------------------------------- void __fastcall tform1::saqlash1click(tobject *sender) { if (filename == "yangi hujjat") { kabisaqlash1->click(); } else { memo1->lines->savetofile(filename); } } //--------------------------------------------------------------------------- void __fastcall tform1::ochish1click(tobject *sender) { int res = messagedlg("o'zgarishlarni saqlaysizmi?",mtinformation,tmsgdlgbuttons() click(); if (opendialog1->execute()) { filename = opendialog1->filename; memo1->lines->loadfromfile(filename); caption = extractfilename(filename); } } else if (res == mrno) { if (opendialog1->execute()) { filename = opendialog1->filename; memo1->lines->loadfromfile(filename); caption = extractfilename(filename); } } } //--------------------------------------------------------------------------- void __fastcall tform1::yangi1click(tobject *sender) { int res = messagedlg("o'zgarishlarni saqlaysizmi?",mtinformation,tmsgdlgbuttons() click(); filename = "yangi hujjat"; memo1->clear(); } else if (res == mrno) { saqlash1->click(); filename = "yangi hujjat"; memo1->clear(); } } //--------------------------------------------------------------------------- void __fastcall tform1::chiqish1click(tobject *sender) { close(); } //--------------------------------------------------------------------------- void __fastcall tform1::formclose(tobject *sender, tcloseaction &action) { int res = messagedlg("o'zgarishlarni saqlaysizmi?",mtinformation,tmsgdlgbuttons() click(); } else if (res == mrcancel) { …
3 / 9
------------------------------------- void __fastcall tform1::dasturhaqida1click(tobject *sender) { form2->showmodal(); } //--------------------------------------------------------------------------- void __fastcall tform1::chopetish1click(tobject *sender) { ansistring tfilename; if (filename == "yangi hujjat") { tfilename = "tempprint.txt"; memo1->lines->savetofile(tfilename); } else { tfilename = filename; } if (printdialog1->execute()) { shellexecutea(handle,"print",filename.c_str(), null, null, null); } } //--------------------------------------------------------------------------- image1.png image2.png image3.png image4.png image5.png
4 / 9
bloknot dasturi - Page 4
5 / 9
bloknot dasturi - Page 5

Want to read more?

Download all 9 pages for free via Telegram.

Download full file

About "bloknot dasturi"

2-dedline. bloknot dasturini tayyorlash. men bloknot dasturini tayyorlash uchun c++ builder dasturlash muhitining rad studio xe3 versiyasidan foydalandim. c++ builderda yangi loyiha yaratamiz: dastlab bloknot dasturini interfeysini yaratib olamiz. dastlab formaga mainmenu komponentasini menyular hosil qilish uchun joylashtiramiz: so’ng mainmenu komponentasi orqali quyidagi, “fayl,tahrirlash,shrift,ma’lumotlar” kabi menyularni yaratib oldim: undan keyin yozgan ma’lumotlar ustida tahrirlashlar bajarish uchun fontdialog, ma’lumotlar yozish uchun memo1,ularni saqlash uchun savedialog,kiritgan o’zgarishlarni saqlash uchun esa opendialog komponentalarini yaratib oldim. va bizning blacnotimiz tayyor holatga keldi: dastur kodi: //--------------------------------------------------------------------...

This file contains 9 pages in DOCX format (2.0 MB). To download "bloknot dasturi", click the Telegram button on the left.

Tags: bloknot dasturi DOCX 9 pages Free download Telegram