本文整理汇总了C++中TForm类的典型用法代码示例。如果您正苦于以下问题:C++ TForm类的具体用法?C++ TForm怎么用?C++ TForm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TForm类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: 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.", 8, "." ) );
p->lastInserted->enableCard( 0, 1 );
p->lastInserted->enableCardLabel( 20, 4 );
p->insert( new TNameField( m, "Name, Vorname", 30, moVert ) );
p->lastInserted->enableCard( 0, 0 );
p->lastInserted->enableCardLabel( 0, 1, 28 );
p->insert( new TTextField( m, "Strasse, Nr.", 30, moVert ) );
p->lastInserted->enableCard( 30, 0 );
p->lastInserted->enableCardLabel( 0, 2, 28 );
p->insert( new TTextField( m, "PLZ, Wohnort", 30, moVert ) );
p->lastInserted->enableCard( 60, 0 );
p->lastInserted->enableCardLabel( 0, 3, 28 );
p->insert( new TDateField( m, "Geburtsdatum", 10, "TT.MM.JJJJ", moDown ) );
p->lastInserted->enableCard( 105, 0 );
p->lastInserted->enableCardLabel( 0, 4 );
p->insert( new TTextField( m, "Geschlecht", 1, moHor ) );
p->lastInserted->enableCard( 115, 0 );
p->lastInserted->enableCardLabel( 11, 4 );
p->insert( new TDateField( m, "Eintrittsdatum", 10, "TT.MM.JJJJ",
moDown ) );
p->lastInserted->enableCard( 98, 1 );
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( "verheiratet ",
new TSItem( "geschieden ",
new TSItem( "getrennt ",
new TSItem( "verwitwet ", 0 ))))),
moDown ) );
p->lastInserted->enableCard( 0, 2 );
m.control.a.y += 4;
m.control.b.y += 4;
p->insert( new TRadioField( m, "Klasse ",
5,
new TSItem( "PRIV.",
new TSItem( "PRIV. AKUT",
new TSItem( "PRIV. E",
new TSItem( "HALBPRIV.",
new TSItem( "HP AKUT",
new TSItem( "HP E+B4",
new TSItem( "ALLG.",
new TSItem( "ALLG. AKUT",
new TSItem( "BLI",
new TSItem( "UNBEK.", 0 )))))))))),
new TSItem( "PRIVAT ",
new TSItem( "PRIVAT AKUT ",
new TSItem( "PRIVAT E ",
new TSItem( "HALBPRIVAT ",
new TSItem( "HP AKUT ",
new TSItem( "HP E+E4 ",
new TSItem( "ALLGEMEIN ",
new TSItem( "ALLG. AKUT ",
new TSItem( "BLI ",
new TSItem( "UNBEKANNT ", 0 )))))))))),
moDown ) );
p->lastInserted->enableCard( 108, 1);
f->insert( p );
return f;
}
开发者ID:jskripsky,项目名称:ancient,代码行数:98,代码来源:KILCHPAT.CPP
示例17: TForm
TForm *TSpecDefinition::initForm()
{
TForm *f = new TForm();
TPage *p;
TMeasurements m = TMeasurements();
/* Contructing Page 1... */
p = new TPage( "Patientendaten I" );
m.reset();
p->insert( new TTextField( m, "Aufnahmenummer", 8 ) );
p->insert( new TNameField( m, "Name", 32, moVert ) );
p->insert( new TTextField( m, "Geburtsname", 20, moHor ) );
p->insert( new TTextField( m, "Geburtsdatum", 8 ) );
p->insert( new TTextField( m, "PLZ", 5, moDown ) );
p->insert( new TTextField( m, "Wohnort", 23 ) );
p->insert( new TTextField( m, "Strasse", 29 ) );
p->insert( new TTextField( m, "Familienstand", 1 ) );
p->insert( new TTextField( m, "Geschlecht", 1, moRight ) );
f->insert( p );
/* Contructing Page 2... */
p = new TPage( "Patientendaten II" );
m.reset();
p->insert( new TTextField( m, "Herkunftsschl�ssel", 2 ) );
p->insert( new TTextField( m, "Staatsangeh�rigkeit", 2, moDown ) );
p->insert( new TTextField( m, "Religion", 1, moDown ) );
p->insert( new TTextField( m, "Einweisungsart", 2, moDown ) );
p->insert( new TTextField( m, "Aufnahmedatum", 6, moDown ) );
p->insert( new TTextField( m, "Aufnahmeuhrzeit", 4, moDown ) );
p->insert( new TTextField( m, "Klinik/Station", 4, moDown ) );
p->insert( new TTextField( m, "Pflegesatzschl�ssel", 2, moDown ) );
p->insert( new TTextField( m, "Zimmerzuschlagkennz.", 2, moDown ) );
f->insert( p );
/* Contructing Page 3... */
p = new TPage( "Entlass./Kostentr." );
m.reset();
p->insert( new TTextField( m, "Liquidationskennz.", 2 ) );
p->insert( new TTextField( m, "Entlassungsdatum", 4 ) );
p->insert( new TTextField( m, "Entlassungsuhrzeit", 4 ) );
p->insert( new TTextField( m, "Entlassungsart", 1 ) );
p->insert( new TTextField( m, "Externes Krankenhaus", 1 ) );
p->insert( new TTextField( m, "Kostentr�gerschl�ssel", 4 ) );
p->insert( new TTextField( m, "Kostentr�gername", 29, moVert ) );
p->insert( new TTextField( m, "PLZ", 5, moVert ) );
p->insert( new TTextField( m, "Ort", 11 ) );
f->insert( p );
/* Contructing Page 4... */
p = new TPage( "Stammversicherter" );
m.reset();
m.control.a.y++; m.control.b.y++;
p->insert( new TTextField( m, "Aktenzeichen Kostentr�ger", 30, moVert ) );
p->insert( new TTextField( m, "Mitgliedsart", 1, moHor ) );
p->insert( new TTextField( m, "Name Stammversicherter", 26, moVert ) );
p->insert( new TTextField( m, "Geburtsdatum Stammvers.", 8, moHor ) );
p->insert( new TTextField( m, "Beruf Stammvers.", 20, moVert ) );
p->insert( new TTextField( m, "Arbeitgeber Stammvers.", 25, moVert ) );
f->insert( p );
/* Contructing Page 5... */
p = new TPage( "Angeh�rige/Arzt" );
m.reset();
m.control.a.y++; m.control.b.y++;
p->insert( new TTextField( m, "Name n�chster Angeh�riger", 32, moVert ) );
p->insert( new TTextField( m, "PLZ", 5, moVert ) );
p->insert( new TTextField( m, "Wohnort", 23 ) );
p->insert( new TTextField( m, "Strasse", 30 ) );
p->insert( new TTextField( m, "Telefon Angeh.", 12, moHor ) );
p->insert( new TTextField( m, "Schl�ssel einweisender Arzt", 4 ) );
p->insert( new TTextField( m, "Name einweisender Arzt", 28, moVert ) );
f->insert( p );
return f;
}
开发者ID:jskripsky,项目名称:ancient,代码行数:88,代码来源:SPECDEF.CPP
示例18: switch
void __fastcall TGLForm2D::FormKeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
switch(Key){
case(TECLA_E):
cols = 0;
while(!embaldosa && cols <= 0){
TForm* x = new TFormS(this,cols);
x->Caption = "Introduce Columnas";
x->ShowModal();
}
embaldosa = !embaldosa;
if(!embaldosa)
glViewport(0,0,ClientWidth,ClientHeight);
break;
case(KEY_LEFT):
xLeft += 5;
xRight += 5;
centroX += 5;
sc->set(xLeft,xRight,yTop,yBot);
break;
case(KEY_RIGHT):
xLeft -= 5;
xRight -= 5;
centroX -= 5;
sc->set(xLeft,xRight,yTop,yBot);
break;
case(KEY_UP):
yTop -= 5;
yBot -= 5;
centroY -= 5;
sc->set(xLeft,xRight,yTop,yBot);
break;
case(KEY_DOWN):
yTop += 5;
yBot += 5;
centroY += 5;
sc->set(xLeft,xRight,yTop,yBot);
break;
case(ZOOM_IN):
nuevoAncho = (xRight-xLeft)/1.1;
nuevoAlto = (yTop-yBot)/1.1;
yBot = centroY-(nuevoAlto/2.0);
yTop = centroY+(nuevoAlto/2.0);
xRight = centroX+(nuevoAncho/2.0);
xLeft = centroX-(nuevoAncho/2.0);
sc->set(xLeft,xRight,yTop,yBot);
break;
case(ZOOM_OUT):
nuevoAncho = (xRight-xLeft)*1.1;
nuevoAlto = (yTop-yBot)*1.1;
yBot = centroY-(nuevoAlto/2.0);
yTop = centroY+(nuevoAlto/2.0);
xRight = centroX+(nuevoAncho/2.0);
xLeft = centroX-(nuevoAncho/2.0);
sc->set(xLeft,xRight,yTop,yBot);
break;
}
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(xLeft,xRight, yBot,yTop);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
GLScene();
}
开发者ID:HectorGPala,项目名称:Practices-openGL,代码行数:67,代码来源:UFP.cpp
示例19: 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 TNameField( m, "Name", 28 ) );
// p->lastInserted->enableCard( 0, 0 );
// p->lastInserted->enableCardLabel( 0, 0, 27 );
p->insert( new TTextField( m, "Geb./Ledigername", 20 ) );
// p->lastInserted->enableCard( 30, 0 );
// p->lastInserted->enableCardLabel( 0, 1 );
p->insert( new THiddenConstField( m, "", 8 ) );
m.control.a.y -= 2;
m.control.b.y -= 2;
p->insert( new TNameField( m, "Vorname", 18 ) );
p->insert( new THiddenConstField( m, "", 10 ) );
m.control.a.y -= 2;
m.control.b.y -= 2;
p->insert( new TTextField( m, "Anrede", 20 ) );
p->insert( new TTextField( m, "Pflegeklasse", 10 ) );
p->insert( new THiddenConstField( m, "", 10 ) );
m.control.a.y -= 2;
m.control.b.y -= 2;
p->insert( new TDateField( m, "Geb.Datum", 10, "TT.MM.JJJJ" ) );
p->insert( new TDateField( m, "E-Datum", 10, "TT.MM.JJJJ", moVert | moDown ) );
p->insert( new TTextField( m, "Fallnummer", 8, moVert ) );
p->insert( new TTextField( m, "PLZ, Ort", 30, moHor ) );
p->insert( new TTextField( m, "Strasse ", 24, moNoSpace ) );
p->insert( new THiddenConstField( m, "", 6 ) );
m.control.a.y -= 2;
m.control.b.y -= 2;
f->insert( p );
/* Contructing Page 2... */
p = new TPage( "Personalien II" );
m.reset();
p->insert( new TTextField( m, "Geschlecht", 1 ) );
// p->insert( new TRadioField( m, "Geschlecht",
// 1,
// new TSItem( "M�nnlich",
// new TSItem( "Weiblich", 0 )),
// new TSItem( "M",
// new TSItem( "W", 0 )),
// moDown ) );
p->insert( new THiddenConstField( m, "", 9 ) );
m.control.a.y -= 2;
m.control.b.y -= 2;
p->insert( new TTextField( m, "Behand.Bereich-Text", 10 ) );
p->insert( new THiddenConstField( m, "", 96 ) );
m.control.a.y -= 2;
m.control.b.y -= 2;
p->insert( new TTextField( m, "Einweisender Arzt", 28 ) );
p->insert( new TTextField( m, "Hausarzt", 28 ) );
p->insert( new THiddenConstField( m, "", 20 ) );
m.control.a.y -= 2;
m.control.b.y -= 2;
p->insert( new TTextField( m, "Konfession", 10 ) );
p->insert( new THiddenConstField( m, "", 10 ) );
m.control.a.y -= 2;
m.control.b.y -= 2;
p->insert( new TTextField( m, "Beruf", 20 ) );
p->insert( new THiddenConstField( m, "", 8 ) );
m.control.a.y -= 2;
m.control.b.y -= 2;
p->insert( new TTextField( m, "Telefon priv.", 15 ) );
p->insert( new THiddenConstField( m, "", 113 ) );
m.control.a.y -= 2;
m.control.b.y -= 2;
f->insert( p );
/* Contructing Page 3... */
p = new TPage( "Personalien III" );
//.........这里部分代码省略.........
开发者ID:jskripsky,项目名称:ancient,代码行数:101,代码来源:TEMP.CPP
示例20: TForm
//---------------------------------------------------------------------------
void __fastcall TMainForm::btnApplyClick(TObject *Sender)
{
TForm* processForm = new TForm(this);
TLabel* lb = new TLabel(this);
lb->Parent = processForm;
lb->ParentFont = FALSE;
lb->ParentColor = FALSE;
lb->Color = clBlack;
lb->Caption = "IP 변경 중 입니다...";
lb->Font->Name = "나눔고딕";
lb->Font->Size = 14;
lb->Top = (processForm->Height / 2) - (lb->Height / 2);
lb->Left = (processForm->Width / 2) - (lb->Width / 2);
processForm->BorderStyle = bsNone;
processForm->Position = poScreenCenter;
processForm->Show();
processForm->AlphaBlend = TRUE;
processForm->AlphaBlendValue = 0;
for(int i=0; i<255; i++)
{
for(int x=0; x<50000; x++){}
processForm->AlphaBlendValue = i;
}
//Delay(1000);
//cmd 이용하기 위한 선언
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
ZeroMemory(&pi, sizeof(pi));
// 도스창이 안보이게
si.dwFlags = STARTF_USESHOWWINDOW|STARTF_USESTDHANDLES;
si.wShowWindow = SW_HIDE;
TCHAR* cmd = new TCHAR[MAX_PATH];
TCHAR* buf = NULL;
INT cmdSize = 0;
TCHAR* networkName = new TCHAR[36];
RegSearchNetworkName(g_selectNetworkCardID_Key, networkName);
DWORD* result = new DWORD; //프로세스 실행 후 결과값 받아오기 위한 변수.
if(SelectDHCP->Buttons[1]->Checked == TRUE)
{
_stprintf(cmd, _T("netsh interface ipv4 set address name=\"%s\" source=dhcp"), networkName);;
cmdSize = _tcslen(cmd);
buf = new TCHAR[cmdSize];
_tcscpy(buf, cmd);
//cmd 실행.
if(!CreateProcess(NULL, buf, NULL, NULL, FALSE, CREATE_NEW_PROCESS_GROUP, NULL, NULL, &si, &pi))
{
ShowMessage("DHCP CreateProcess Error");
delete buf;
Abort();
}
WaitForSingleObject(pi.hProcess, INFINITE); //프로세스 종료 시까지 기다림.
GetExitCodeProcess(pi.hProcess, result); //프로세스 결과 값 리턴. 정상 : 0, 비정상 : 1
if(*result != 0)
{
ShowMessage("변경하지 못하였습니다.\n"
"다음과 같은 문제일 수 있습니다.\n"
"1.사용자 계정 컨트롤 사용중\n"
"2.이미 DHCP 사용중");
for(int i=255; i>0; i--)
{
processForm->AlphaBlendValue = i;
for(int x=0; x<50000; x++){}
}
processForm->Hide();
delete result;
delete lb;
delete buf;
Abort();
}
delete buf;
}
else
{
_stprintf(cmd, _T("netsh interface ipv4 set address name=\"%s\" source=static %s %s %s"), networkName, SelectIP->Text.w_str(), SelectSM->Text.w_str(), SelectDG->Text.w_str());
cmdSize = _tcslen(cmd);
buf = new TCHAR[cmdSize];
_tcscpy(buf, cmd);
if(!CreateProcess(NULL, buf, NULL, NULL, FALSE, CREATE_NEW_PROCESS_GROUP, NULL, NULL, &si, &pi))
{
ShowMessage("CreateProcess : 고정 IP 적용 실패");
//.........这里部分代码省略.........
开发者ID:japgo,项目名称:mygithub,代码行数:101,代码来源:Main.cpp
注:本文中的TForm类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论