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


C++ TForm::Show方法代码示例

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


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

示例1: 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

示例2: 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

示例3: btnApplyClick

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