OSDN Git Service

最前面On/Offを繰り返すと出るエラーの修正。
authorh677 <h677>
Mon, 10 May 2004 13:36:14 +0000 (13:36 +0000)
committerh677 <h677>
Mon, 10 May 2004 13:36:14 +0000 (13:36 +0000)
(感謝 開発スレ2の428氏)

Editor.pas

index 00f1b5d..abe0c4e 100644 (file)
@@ -965,9 +965,9 @@ procedure TEditorForm.TopActionExecute(Sender: TObject);     // 
 begin
        if not (fsShowing in Self.FormState) then begin
                if TopAction.Checked then begin // \83X\83e\83C\8fó\91Ô\82É\90Ý\92è
-                       FormStyle := fsStayOnTop;
+                       SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
                end     else begin   // \83X\83e\83C\8fó\91Ô\89ð\8f\9c
-                       FormStyle := fsNormal;
+                       SetWindowPos(Handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
                end;
                // \83X\83e\83C\8fó\91Ô\82Ì\95Û\91
                GikoSys.Setting.EditWindowStay := FormStyle = fsStayOnTop;