delphi-statusformの非表示設定

 FMX をここで編集すること


×非活性の場合、
// システムメニューの「閉じる」ボタンやMenuを無効にする
// 閉じるボタンを無効にする
procedure TForm1.Button1Click(Sender: TObject);
var
  hMenuHandle : HMENU;
begin
  hMenuHandle := GetSystemMenu(Self.Handle,False);
  if hMenuHandle <> 0 then
  begin
    EnableMenuItem(hMenuHandle, SC_CLOSE, (MF_BYCOMMAND or MF_DISABLED
or MF_GRAYED));
  end;
  DrawMenuBar(Self.Handle);
end;

// 閉じるボタンを有効にする
procedure TForm1.Button2Click(Sender: TObject);
var
  hMenuHandle : HMENU;
begin
  hMenuHandle := GetSystemMenu(Self.Handle,False);
  if hMenuHandle <> 0 then
  begin
    EnableMenuItem(hMenuHandle, SC_CLOSE, (MF_BYCOMMAND or MF_ENABLED));
  end;
  DrawMenuBar(Self.Handle);
end;
self.handleで取れない場合

WindowHandleToPlatform(Self.Handle).Wnd

オブジェクトのコピー
angular.copy(xxx)
Next Post Previous Post
No Comment
Add Comment
comment url