custdata.cpp
来自「《C Builder 5程序设计——数据库应用实务篇》程序源代码」· C++ 代码 · 共 41 行
CPP
41 行
//----------------------------------------------------------------------------
//Borland C++Builder
//Copyright (c) 1987, 1998 Borland International Inc. All Rights Reserved.
//----------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "CustData.h"
#include "DM.h"
#include "Toolbar.h"
#include "CustOrds.h"
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
TfmCustomer *fmCustomer;
//---------------------------------------------------------------------------
__fastcall TfmCustomer::TfmCustomer(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TfmCustomer::FormActivate(TObject *Sender)
{
fmToolbar->SetNavigator(DM1->CustomersSource);
}
//---------------------------------------------------------------------
void __fastcall TfmCustomer::FormClose(TObject *Sender,
TCloseAction &Action)
{
int I;
bool bl = false;
for(I=Application->ComponentCount; I==1;I--)
{
if(Application->Components[I] == fmCustOrd)
bl = true;
if(!bl)
fmToolbar->DBNavigator1->DataSource = NULL;
}
}
//---------------------------------------------------------------------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?