掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
MessageBoxの表示位置について (ID:20084)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
private procedure WMSpecial(var Msg: TMessage); Message WM_APP; procedure TForm1.Button1Click(Sender: TObject); begin PostMessage(Handle, WM_APP, 0, 0); Application.MessageBox('おしっこチャウで〜', 'はしっこ', MB_OKCANCEL + MB_DEFBUTTON2); PostMessage(Handle, WM_APP, 0, 0); Application.MessageBox('きらら、はえぬき、どまんなか〜', 'どまんなか', MB_OKCANCEL + MB_DEFBUTTON1); end; //--------{}<>=() := ''?%&#$!"~?!(**)--------// procedure TForm1.WMSpecial(var Msg: TMessage); var hW: HWND; R: TRect; X, Y: Integer; begin hW := FindWindow('#32770', 'どまんなか'); if hW <> 0 then begin GetWindowRect(hW, R); X := (Screen.Width-(R.Right-R.Left)) div 2; Y := (Screen.Height-(R.Bottom-R.Top)) div 2; SetWindowPos(hW, HWND_TOPMOST, X, Y, 0, 0, SWP_NOSIZE); end; hW := FindWindow('#32770', 'はしっこ'); if hW <> 0 then begin GetWindowRect(hW, R); X := Screen.Width-(R.Right-R.Left); Y := Screen.Height-(R.Bottom-R.Top); SetWindowPos(hW, HWND_TOPMOST, X, Y, 0, 0, SWP_NOSIZE); end; end;
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.