Guruh talabasi Solijonov Axliddin Mavzu: Bloknot yaratish



Download 366,25 Kb.
Sana15.06.2022
Hajmi366,25 Kb.
#672935
Bog'liq
Blaknot dasturi


631-21 guruh talabasi Solijonov Axliddin

Mavzu:Bloknot yaratish.
Kod qismi:
//---------------------------------------------------------------------------

#include


#pragma hdrstop

#include "Unit1.h"


//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
String fn;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Yangi1Click(TObject *Sender)
{
if(RichEdit1->Modified)
{
switch (MessageDlg("Ma'lumotlar o'zgargan.Saqlaysizmi?",
mtConfirmation,mbYesNoCancel,0
)) {
case mrYes: Saqlash1->Click(); break;
case mrNo:RichEdit1->Clear(); break;
case mrCancel: break;
default:
;
}
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Yangisaqlash1Click(TObject *Sender)
{
if(SaveTextFileDialog1->Execute())
{
RichEdit1->Lines->SaveToFile(SaveTextFileDialog1->FileName);
fn=SaveTextFileDialog1->FileName;
Form1->Caption=fn;
RichEdit1->Modified=false;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Ochish1Click(TObject *Sender)
{
OpenTextFileDialog1->Execute();
RichEdit1->Lines->LoadFromFile(OpenTextFileDialog1->FileName) ;
fn=OpenTextFileDialog1->FileName;
Form1->Caption=fn;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Saqlash1Click(TObject *Sender)


{
if(fn.IsEmpty())
{
Yangisaqlash1->Click();
}
else
{
RichEdit1->Lines->SaveToFile(fn);
RichEdit1->Modified=false;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Chiqish1Click(TObject *Sender)
{

if(RichEdit1->Modified)


{
switch (MessageDlg("Ma'lumotlar o'zgargan.Saqlaysizmi?",
mtConfirmation,mbYesNoCancel,0
)) {
case mrYes: Saqlash1->Click(); break;
case mrNo:RichEdit1->Modified=false; break;
case mrCancel:
Abort();
break;
default:
;
}
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Chopetish1Click(TObject *Sender)
{
PrintDialog1->Execute();
RichEdit1->Print(RichEdit1->Text) ;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Qirqis1Click(TObject *Sender)
{
RichEdit1->CutToClipboard() ;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Nusxalash1Click(TObject *Sender)
{
RichEdit1->CopyToClipboard();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Joylash1Click(TObject *Sender)
{
RichEdit1->PasteFromClipboard();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Barchasinibelgilash1Click(TObject *Sender)
{
RichEdit1->SelectAll();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Shrift1Click(TObject *Sender)
{
FontDialog1->Execute();
RichEdit1->Font=FontDialog1->Font;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Qirqish1Click(TObject *Sender)
{
Qirqish1->Click();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Nusxalash2Click(TObject *Sender)
{
Nusxalash1->Click();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::joylash2Click(TObject *Sender)
{
Joylash1->Click();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Barchasinibelgilash2Click(TObject *Sender)
{
Barchasinibelgilash1->Click();
}
//---------------------------------------------------------------------------

void __fastcall TForm1::ranglar1Click(TObject *Sender)


{
ColorDialog1->Execute();
RichEdit1->Color=ColorDialog1->Color;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action)


{
if(RichEdit1->Modified)
{
switch (MessageDlg("Ma'lumotlar o'zgargan.Saqlaysizmi?",
mtConfirmation,mbYesNoCancel,0
)) {
case mrYes: Saqlash1->Click();Close(); break;
case mrNo:RichEdit1->Modified=false;Close(); break;
case mrCancel:
Abort();
break;
default:
;
}
}
}
//---------------------------------------------------------------------------
Natija





Download 366,25 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish