LoginSignup
0
1

More than 5 years have passed since last update.

C++ Builder XE4 > geometry > ウィンドウを最大化している状態から通常のサイズにする

Posted at
動作環境
C++ Builder XE4

関連

上記の処理において、ウィンドウの最大化をしていると処理が失敗する。

最大化から通常のサイズへ

下記のコードが有効であるようだ。

Unit1.cpp
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
    if (this->WindowState == wsMaximized) {
        this->WindowState = wsNormal;
    }
}
//---------------------------------------------------------------------------
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1