当前位置: 首页>>代码示例>>C++>>正文


C++ TForm类代码示例

本文整理汇总了C++中TForm的典型用法代码示例。如果您正苦于以下问题:C++ TForm类的具体用法?C++ TForm怎么用?C++ TForm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TForm类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: TForm

//---------------------------------------------------------------------------
void __fastcall TPictureViewer::FullViewBClick(TObject *Sender)
{
  TForm* ImageFullView = new TForm(this);
  ImageFullView->Color = FBackGroundColor;
  TImage* FullImage = new TImage(ImageFullView);
  FullImage->Transparent = Image->Transparent;
  try {
    ImageFullView->BorderStyle = bsToolWindow;
    ImageFullView->FormStyle   = fsStayOnTop;
    ImageFullView->Position    = poScreenCenter;
    ImageFullView->Caption     = GetString(sPicturePreview);
    FullImage->Left = 0;
    FullImage->Top  = 0;
    FullImage->AutoSize = true;
    FullImage->Picture = Image->Picture;
    ImageFullView->ClientWidth  = FullImage->Width;
    ImageFullView->ClientHeight = FullImage->Height;
    FullImage->Parent = ImageFullView;
    FullViewB->Enabled = false;
    ImageFullView->ShowModal();
    FullViewB->Enabled = true;
    delete FullImage;     FullImage = NULL;
    delete ImageFullView; ImageFullView = NULL;
    Image->Update();
  } catch (Exception &e) {
    if (FullImage)     delete FullImage;
    if (ImageFullView) delete ImageFullView;
    FullViewB->Enabled = true;
  }
}
开发者ID:aurusov,项目名称:rdo_explorer,代码行数:31,代码来源:Dr_PictureViewer.cpp

示例2: TFormS

void __fastcall TGLForm2D::FormMouseDown(TObject *Sender,
      TMouseButton Button, TShiftState Shift, int X, int Y)
{
        GLdouble relacionAncho = (xRight-xLeft)/ClientWidth;
        GLdouble relacionAlto = (yTop-yBot)/ClientHeight;
        GLdouble cx = xLeft + (GLfloat)X*relacionAncho;
        GLdouble cy = yTop - (GLfloat)Y*relacionAlto;
        if(Button == mbLeft){
                if(!seleccionar){
                        int tam;
                        if(sc->getArbol()->empty()){
                                TForm* x = new TFormS(this,tam);
                                x->Caption = "Introduce Tamaño";
                                x->ShowModal();
                        }
                        sc->getArbol()->anidar(cx,cy,aleatorio,tam);
                }
                else if(!sc->getArbol()->empty()){
                        PVD2* p = new PVD2(cx,cy);
                        if(sc->getArbol()->selCuadrado(p))
                                seleccionar = false;
                        delete p; p = NULL;
                }else{
                        seleccionar = false;
                        ShowMessage("No hay nada que seleccionar!");
                }
                GLScene();
        }
        else{
                sc->getArbol()->desanidar();
                GLScene();
        }
}
开发者ID:HectorGPala,项目名称:Practices-openGL,代码行数:33,代码来源:UFP.cpp

示例3: SetNewPageFromDLL

//---------------------------------------------------------------------------
void SetNewPageFromDLL(AnsiString DLLName)
{
 if (!FileExists(DLLName)) return;

 TPageControl *myPages=FormSelected->PageControlSelected;

 if (!Pages) CountPagesBefore=myPages->PageCount;

 TForm *Form;
 dllInstance = LoadLibrary(DLLName.c_str());

 if (!Pages) Pages = new TList();
 if (!dllInstances) dllInstances=new TList();
 dllInstances->Add(dllInstance);

 CreatePage = NULL;
 CreatePage = (TCreate *)GetProcAddress(dllInstance, "_CreatePage");
 GetTitlePage = (TGetTitle *)GetProcAddress(dllInstance, "_GetTitlePage");
 if (CreatePage)
 {
  Form = CreatePage(myPages->PageCount,FormSelected);
  Pages->Add(Form);
  Form->ManualDock(myPages, NULL, alClient);
  Form->Visible = true;
//  myPages->ActivePageIndex = myPages->PageCount - 1;
 }
 if (GetTitlePage)
   myPages->Pages[myPages->PageCount-1]->Caption=AnsiString(GetTitlePage());
}
开发者ID:txe,项目名称:ieml,代码行数:30,代码来源:UnitWorkDLL.cpp

示例4: TForm

TForm *TSpecDefinition::initForm()
{
	TForm *f = new TForm();
	TPage *p;

	TMeasurements m = TMeasurements();

	/* Contructing Page 1... */
	p = new TPage( "Kostenstelle" );
	m.reset();

	p->insert( new TSpecCardTextField( m, "Nummer", 3 ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 12, 0 );
	p->lastInserted->enableCardLabel( 0, 1 );
	p->lastInserted->setInfoLevel( ilNormal );

	p->insert( new TSpecCardTextField( m, "Bezeichnung", 29, moVert ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCardLabel( 0, 0 );
	p->lastInserted->setInfoLevel( ilNormal );

	p->insert( new THiddenConstField( m, "KOSTENSTELLE", 12 ) );
	p->lastInserted->enableCard( 0, 0 );

	p->insert( new THiddenConstField( m, "KOSTENSTELLE", 12 ) );
	p->lastInserted->enableCard( 0, 1 );

	p->insert( new THiddenConstField( m, "KOSTENSTELLE", 12 ) );
	p->lastInserted->enableCard( 0, 2 );

	f->insert( p );
	return f;
}
开发者ID:jskripsky,项目名称:ancient,代码行数:34,代码来源:KOSTENST.CPP

示例5: TCounterpartyRouteSheet

//---------------------------------------------------------------------------
void __fastcall TRouteSheet::AddButtonClick(TObject *Sender) //Добавление контрагента
{
//CounterpartyRouteSheet->Show();
  TForm *myCounterpartyRouteSheet = new TCounterpartyRouteSheet(this);
  myCounterpartyRouteSheet->ShowModal();
  delete myCounterpartyRouteSheet;
}
开发者ID:DanilDerlyuk,项目名称:Secretary,代码行数:8,代码来源:Unit5.cpp

示例6: TFormAnyadirPartido

void __fastcall TFormClasificacion::ButtonAnyadirPartidoClick(
      TObject *Sender)
{
TForm *x = new TFormAnyadirPartido(this,t);
x->ShowModal();
delete x;
MostrarClasificacion();
}
开发者ID:JaviAlejos,项目名称:football-tournament-management,代码行数:8,代码来源:UFormClasificacion.cpp

示例7: TFormListadoPartidos

void __fastcall TFormClasificacion::ButtonListadoPartidosClick(
      TObject *Sender)
{
TForm *x = new TFormListadoPartidos(this,t);
x->ShowModal();
delete x;
MostrarClasificacion();
}
开发者ID:JaviAlejos,项目名称:football-tournament-management,代码行数:8,代码来源:UFormClasificacion.cpp

示例8: TFormBorrarEquipo

void __fastcall TFormClasificacion::ButtonBorrarEquipoClick(
      TObject *Sender)
{
TForm *x = new TFormBorrarEquipo(this,t);
x->ShowModal();
delete x;
MostrarClasificacion();
}
开发者ID:JaviAlejos,项目名称:football-tournament-management,代码行数:8,代码来源:UFormClasificacion.cpp

示例9: TForm

TForm *TSpecDefinition::initForm()
{
	TForm *f = new TForm();
	TPage *p;

	TMeasurements m = TMeasurements();

	/* Contructing Page 1... */
	p = new TPage( "Mitarbeiter" );
	m.reset();

	p->insert( new TTextField( m, "Titel", 10 ) );

	p->insert( new TNameField( m, "Name   ", 30 ) );

	p->insert( new TNameField( m, "Vorname", 15, moNoSpace ) );

	p->insert( new TDateField( m, "Geburtsdatum", 10, "TT.MM.JJJJ", moHor ) );
	p->lastInserted->setInfoLevel( ilNormal );

/*	p->insert( new TRadioField( m, "Geschlecht",
								2,
								new TSItem( "M�nnlich",
								new TSItem( "Weiblich",
								new TSItem( "S�ugling m�nnlich",
								new TSItem( "S�ugling weiblich",
								0 )))),
								new TSItem( "M",
								new TSItem( "W",
								new TSItem( "SM",
								new TSItem( "SW",
								0 )))),
								moDown ) ); */

	p->insert( new TTextField( m, "Abteilung/Kostenstelle", 30, moVert ) );
	p->insert( new TTextField( m, "Funktion", 30, moVert ) );
	p->insert( new TTextField( m, "Zuordnung   ", 5, moHor ) );
	p->insert( new TTextField( m, "Berechtigung", 2, moHor | moDown | moNoSpace ) );

	m.control.a.y += 3;
	m.control.b.y += 3;

	f->insert( p );

	/* Contructing Page 2... */
	p = new TPage( "Passwort" );
	m.reset();
//	m.control.a.y -= 2;
//	m.control.b.y -= 2;

	p->insert( new TTextField( m, "Passwort", 8 ) );
	p->insert( new THiddenConstField( m, "", 288 ) );
	p->insert( new THiddenConstField( m, "#S#", 3 ) );

	f->insert( p );

	return f;
}
开发者ID:jskripsky,项目名称:ancient,代码行数:58,代码来源:DEMO2.CPP

示例10: TfrmView

//---------------------------------------------------------------------------
void __fastcall TfrmMain::New1Click(TObject *Sender)
{
	TForm* p = new TfrmView(this);
    p->Caption = "Untitled";
    p->FreeOnRelease();
    p->Show();

    this->Tile();
}
开发者ID:japgo,项目名称:mygithub,代码行数:10,代码来源:fmain.cpp

示例11: TForm

//---------------------------------------------------------------------------
void __fastcall TFrm1010::ShowAppForms()
{
   SfgForm *AppForm;
   TForm *form = new TForm(Application);
   TStringAlignGrid *grdAppForms = new TStringAlignGrid(form);
   form->ClientHeight = 154;
   form->ClientWidth = 402;
   form->BorderStyle = bsDialog;
   form->BorderIcons = TBorderIcons() << biSystemMenu;
   form->Caption = "Escolher Programa";
   form->Position = poDesktopCenter;
   grdAppForms->Parent = form;
   grdAppForms->ColCount = 4;
   grdAppForms->DefaultRowHeight = 18;
   grdAppForms->AlignCol[1] = alCenter;
   grdAppForms->AlignCell[1][0] = alCenter;
   grdAppForms->AlignCell[2][0] = alCenter;
   grdAppForms->Cells[1][0] = "Programa";
   grdAppForms->Cells[2][0] = "Título";
   grdAppForms->Cells[3][0] = "Módulo";
   grdAppForms->ColWidths[0] = 14;
   grdAppForms->ColWidths[1] = 74;
   grdAppForms->ColWidths[2] = 190;
   grdAppForms->ColWidths[3] = 100;
   grdAppForms->Align = alClient;
   grdAppForms->OnDblClick = &grdAppFormsDblClick;
   grdAppForms->Options = grdAppForms->Options << goColSizing << goRowSelect;
   grdAppForms->RowCount = 2;

   for (int i=0; i<AppForms->Count;i++) {
      AppForm = (SfgForm*)AppForms->Items[i];
      if (i > 0)
        grdAppForms->RowCount++;
      grdAppForms->Cells[1][i+1] = AppForm->FormClass;
      grdAppForms->Cells[2][i+1] = AppForm->FormTitle;
      switch(AppForm->FormModule) {
         case APP_MODULO_ESTOQUE:
            grdAppForms->Cells[3][i+1] = "Estoque";
            break;
         case APP_MODULO_COMPRAS:
            grdAppForms->Cells[3][i+1] = "Compras";
            break;
         case APP_MODULO_VENDAS:
            grdAppForms->Cells[3][i+1] = "Vendas";
            break;
         case APP_MODULO_FINANCAS:
            grdAppForms->Cells[3][i+1] = "Finanças";
            break;
         default:
            grdAppForms->Cells[3][i+1] = "Padrão";
      }
   }
   grdAppForms->SortColumn(1,true);
   grdAppForms->Row = 1;
   form->ShowModal();
   delete form;
}
开发者ID:jpwerka,项目名称:SistemaSFG,代码行数:58,代码来源:uFrm1010.cpp

示例12: TfrmView

//---------------------------------------------------------------------------
void __fastcall TfrmMain::CreateExample1Click(TObject *Sender)
{
	g_painterType = GDI1->Checked ? PAINTER_GDI : PAINTER_OPENGL;

	g_viewType = VIEW_EXAMPLE;
	TForm* p = new TfrmView(this);
	p->Caption = "Example Window";
	p->FreeOnRelease();
	p->Show();

	fLayers->Caption 			= "Example Window";
	fPropertiesMain->Caption	= "Example Window";
	this->Tile();
}
开发者ID:japgo,项目名称:mygithub,代码行数:15,代码来源:fMain.cpp

示例13: CreateMessageDialog

//---------------------------------------------------------------------------
//メッセージダイアログの表示(スレッドオブジェクトから呼ばれる)
//---------------------------------------------------------------------------
int __fastcall TForm1::ShowConfirmMassageForm
	(String MsgText, TMsgDlgType MsgType, TMsgDlgButtons MsgButtons, TMsgDlgBtn MsgDefaultButton)
{

TForm *dlg = CreateMessageDialog(MsgText, MsgType, MsgButtons, MsgDefaultButton);
dlg->ParentWindow = Form1->Handle;

if ( MsgType == mtError) {
	dlg->Caption = LoadResourceString(&Msgexeout::_MSG_CAPTION_ERROR);
}
else {
	dlg->Caption = LoadResourceString(&Msgexeout::_MSG_CAPTION_CONFIRMATION);
}

//メッセージダイアログの表示
int ret = dlg->ShowModal();
delete dlg;
return(ret);

}
开发者ID:Bootz,项目名称:AttacheCase,代码行数:23,代码来源:Unit1.cpp

示例14: main

int main(void)
{
    TSortedCollection *collection;
    int i;
    TForm *f;
    void *p;
    fpstream *s;
    TResourceFile* r;

    cout <<"Creating  " << rezFileName << "\n";

    // Construct stream and resource
    s = new fpstream (rezFileName, ios::out|ios::binary);
    r = new TResourceFile(s);

    // Form
    f = makeForm();
    r->put(f, "FormDialog");

    // Data
    collection = new TDataCollection((dataCount + 10), 5, sizeof(TDataRec),
                                     dataKeyType);
    collection->duplicates = allowDuplicates;
    for(i = 0; i < dataCount; ++i)
    {
        p = new TDataRec;
        f->setData((void *)&data[i]);      // move into object
        f->getData(p);                     // move onto heap
        collection->insert(p);             // insert in sorted order
    }
    r->put(collection, "FormData");

    // Done
    TObject::destroy(f);
    TObject::destroy((TCollection *)collection);
    TObject::destroy(r);
    return 0;
}
开发者ID:Mikelle02,项目名称:GameMaker,代码行数:38,代码来源:GENFORM.CPP

示例15: TForm

TForm *TSpecDefinition::initForm()
{
	TForm *f = new TForm();
	TPage *p;

	TMeasurements m = TMeasurements();

	/* Contructing Page 1... */
	p = new TPage( "Personalien I" );
	m.reset();

	p->insert( new TNumericField( m, "Patientennr.", 10, "." ) );
	p->lastInserted->makeNecessary();
//	p->lastInserted->enableCard( 0, 1 );
	p->lastInserted->enableCard( 29, 1 );
	p->lastInserted->enableCardLabel( 18, 4 );

	p->insert( new TNameField( m, "Name   ", 26 ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 0, 0 );
	p->lastInserted->enableCardLabel( 1, 0 );

	p->insert( new TNameField( m, "Vorname", 12, moNoSpace ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 26, 0 );
	p->lastInserted->enableCardLabel( 1, 1 );

	p->insert( new TTextField( m, "Strasse, Nr.", 26 ) );
	p->lastInserted->enableCard( 64, 0 );

	p->insert( new TTextField( m, "PLZ, Ort    ", 26, moNoSpace ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 38, 0 );
	p->lastInserted->enableCardLabel( 1, 2 );

	p->insert( new TNumericField( m, "Steuer-Code", 3, " ", moVert ) );

	p->insert( new TTextField( m, "Heimatort/Nat.", 18, moVert | moRight ) );

	p->insert( new TDateField( m, "Geburtsdatum", 10, "TT.MM.JJJJ", moHor ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 9, 1 );
	p->lastInserted->enableCardLabel( 1, 3 );
	p->lastInserted->setInfoLevel( ilNormal );

	p->insert( new TRadioField( m, "Geschlecht",
								2,
								new TSItem( "M�nnlich",
								new TSItem( "Weiblich",
								new TSItem( "S�ugling m�nnlich",
								new TSItem( "S�ugling weiblich",
								0 )))),
								new TSItem( "M",
								new TSItem( "W",
								new TSItem( "SM",
								new TSItem( "SW",
								0 )))),
								moDown ) );
	p->lastInserted->makeNecessary();
	p->lastInserted->enableCard( 19, 1 );
	p->lastInserted->enableCardLabel( 13, 3 );

	m.control.a.y += 3;
	m.control.b.y += 3;

	f->insert( p );

	/* Contructing Page 2... */
	p = new TPage( "Personalien II" );
	m.reset();
	m.control.a.y -= 2;
	m.control.b.y -= 2;

	p->insert( new TRadioField( m, "Zivilstand",
								5,
								new TSItem( "ledig",
								new TSItem( "verheiratet",
								new TSItem( "geschieden",
								new TSItem( "getrennt",
								new TSItem( "verwitwet", 0 ))))),
								new TSItem( "LEDIG",
								new TSItem( "VERH.",
								new TSItem( "GESCH",
								new TSItem( "GETR.",
								new TSItem( "VERW.", 0 ))))),
								moDown ) );

	m.control.a.y += 4;
	m.control.b.y += 4;

	p->insert( new TRadioField( m, "Konfession",
								5,
								new TSItem( "reformiert",
								new TSItem( "r�misch-katholisch",
								new TSItem( "christlich-katholisch",
								new TSItem( "neuapostolisch",
								new TSItem( "freikirchlich",
								new TSItem( "j�disch",
								new TSItem( "islamisch",
								new TSItem( "budhistisch",
//.........这里部分代码省略.........
开发者ID:jskripsky,项目名称:ancient,代码行数:101,代码来源:HERZOGEN.CPP


注:本文中的TForm类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。