六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

在BCB中數組的妙用與紀錄與改變控件的狀態

[摘要]如果能巧妙地運用數組會給我們帶來很多方便;以下是我的一些用法,還覺得自己每掌握它的精髓;希望大家多多指點;(現丑了)void ) __declspec(dllexport) myList::ReadList(AnsiString TS)//讀出ini文件的數據 System::AnsiStri...
如果能巧妙地運用數組會給我們帶來很多方便;以下是我的一些用法,還覺得自己每掌握它的精髓;希望大家多多指點;(現丑了)

void ) __declspec(dllexport) myList::ReadList(AnsiString TS)
{//讀出ini文件的數據
   System::AnsiString LabPath=ExtractFilePath(".\\");
   TIniFile *LabIni=new TIniFile(LabPath+"LabIni.ini");



   Form2->AddList();
   for(int i=0;i<Form2->LabelList->Count;i++)
    {
       TLabel *Lab;
       Lab=(TLabel *)Form2->LabelList->Items[i];
       Lab->Left=LabIni->ReadInteger(TS,"Left"+IntToStr(i), Lab->Left);
       Lab->Top=LabIni->ReadInteger(TS,"Top"+IntToStr(i),Lab->Top);
    }
}

void myList::WriteList(AnsiString TS)
{//寫入文件
   System::AnsiString LabPath=ExtractFilePath(".\\");
   TIniFile *LabIni=new TIniFile(LabPath+"LabIni.ini");
   Form2->AddList();
   for(int i=0;i<Form2->LabelList->Count;i++)
    {
       TLabel *Lab;
       Lab=(TLabel *)Form2->LabelList->Items[i];
       LabIni->WriteInteger(TS,"Left"+IntToStr(i), Lab->Left);
       LabIni->WriteInteger(TS,"Top"+IntToStr(i),Lab->Top);
    }
}

  System::AnsiString LabPath=ExtractFilePath(".\\");
   TIniFile *LabIni=new TIniFile(LabPath+"LabIni.ini");



  TList *LabelList;
   LabelList=new TList;
   LabelList->Add(Label1);
   LabelList->Add(Label2);
   LabelList->Add(Label3);
   LabelList->Add(Label4);
   LabelList->Add(Label5);
   LabelList->Add(Label6);
   LabelList->Add(Label7);
   LabelList->Add(Label8);
   LabelList->Add(Label9);
   LabelList->Add(Label10);
   LabelList->Add(Label11);
   LabelList->Add(Label12);
   LabelList->Add(Label13);
   LabelList->Add(Label14);
   LabelList->Add(Label15);






void myList::NmyChick(TMenuItem *Item,AnsiString STR,int BL)
{
   file://記錄TMenuItem 的狀態:
   static TMenuItem *sItem=0;
   file://Item=Form2->PopupMenu1->Items;
   file://Item=dynamic_cast<TMenuItem *>(Form2->WindowMenu->Items->GetParentMenu);
   if(sItem==Item){
      Item->Checked=false;
      return;
   }
   else if(sItem) sItem->Checked=false;
   Item->Checked=true;
   sItem=Item;
   if(Item->Checked==true){
       file://&para;&macr;&Igrave;&not;&cedil;&Auml;±&auml;Form2&micro;&Auml;&acute;ó&ETH;&iexcl;&ordm;&Iacute;&ETH;&Icirc;×&acute;
       if(BL){
         Form2->Image1->Picture->Bitmap->Height =500;
         Form2->Image1->Picture->Bitmap->Width  =732;
         Form2->Image1->Stretch = false;



         file://Form2->Image2->Picture->LoadFromFile(".\\LOGO.bmp");
         Form2->Image2->Width = Form2->Image2->Picture->Width;
         Form2->Image2->Height = Form2->Image2->Picture->Height;
         Form2->Image2->Top  = 12;
         Form2->Image2->Left = 15;
         Form2->Height = 500;
         Form2->Width = 732;
         Form2->Top = 0;
         Form2->Left = Screen->Width-Form2->Width;
         TCanvas *TSS =Form2->Image1->Picture->Bitmap->Canvas;
         Form1->DrawBarCode(TSS,120,300,125);
         Form2->Update();
       }
       else
       {
         Form2->Image1->Picture->Bitmap->Height =732;
         Form2->Image1->Picture->Bitmap->Width  =555;
         Form2->Image1->Stretch = false;



         Form2->Image2->Width = Form2->Image2->Picture->Width;
         Form2->Image2->Height = Form2->Image2->Picture->Height;
         Form2->Image2->Top  = 12;
         Form2->Image2->Left = 15;
         Form2->Height =732 ;
         Form2->Width = 555;
         Form2->Top = 0;
         Form2->Left = Screen->Width-Form2->Width;
         Form1->MakeLabel();
       }
         Form2->Caption = String(Form2->Image1->Picture->Bitmap->Height)+" - "+
                     String(Form2->Image1->Picture->Bitmap->Width);
      ReadList(STR);
      Form2->Update();



     }
}


void __fastcall TForm2::FormHide(TObject *Sender)
{
   AnsiString bj[]={"打橫1","打豎1","打橫2","打豎2","打橫3","打豎3","還原原此設置"};
   for(int i=0;i<PopupMenu1->Items->Count;i++){
      if(PopupMenu1->Items->Items[i]->Checked) LT->WriteList(bj[i]);
      }

}



void __fastcall TForm2::N4Click(TObject *Sender)
{
   LT->NmyChick(Form2->N4,"打豎2",0);
}




void __fastcall TForm2::N5Click(TObject *Sender)
{
   LT->NmyChick(Form2->N5,"打橫2",1);
}



void __fastcall TForm2::N31Click(TObject *Sender)
{
   LT->NmyChick(Form2->N31,"打豎3",0);
}




void __fastcall TForm2::N32Click(TObject *Sender)
{
   LT->NmyChick(Form2->N32,"打橫3",1);
}






主站蜘蛛池模板: 热久久伊人 | 欧美一级做 | 伊人狼人影院 | 综合五月天婷婷丁香 | 色wwwwww| 社区天堂 | 天天插日日干 | 亚洲视频在线观看免费 | 欧美在线一二三 | 天堂亚洲| 天天看天天色 | 午夜tv | 午夜国产精品久久影院 | 新激情五月| 亚洲光棍天堂 | 亚洲国产精品欧美综合 | 亚洲国产精品免费观看 | 婷婷亚洲五月 | 在线观看永久免费视频网站 | 午夜视频免费在线播放 | 四虎新网站 | 最近韩国日本高清免费观看 | 日本伦理中文字幕 | 婷婷开心 | 特级黄 | 奇米色婷婷 | 五月丁香啪啪 | 日本高清在线播放 | 日韩亚洲第一页 | 天堂网在线观看 | 青青91| 日本精高清区一 | 伊人久久中文字幕久久cm | 亚洲自偷自偷图片在线高清 | 午夜欧美精品久久久久久久 | 在线资源站| 伊人免费视频二 | 一级片黄色免费 | 泄欲网站免费观看 | 亚洲人成网址在线观看 | 天天操天天射天天插 |