OSDN Git Service

他のスレッドへのリンクをポップアップ後に、レスアンカーが他スレッドの内容を
[gikonavigoeson/gikonavi.git] / BrowserRecord.pas
index 5a9d456..cd8ced2 100644 (file)
@@ -30,7 +30,8 @@ type
                property        LastSize        : Integer               read FLastSize  write FLastSize;
                property        Repaint         : Boolean               read FRepaint   write FRepaint;
                //property      Movement        : string                read FMovement  write FMovement;
-               procedure       Move(const AName: string);
+               procedure       Move(const AName: string); overload;
+        procedure      Move(scroll: Integer); overload;
                procedure       IDAnchorPopup(Abody :string);
         procedure OpenFindDialog;
        end;
@@ -109,6 +110,29 @@ begin
                end;
        end;
 end;
+// *************************************************************************
+//! \83u\83\89\83E\83U\82ð\83X\83N\83\8d\81[\83\8b\82³\82¹\82é
+// *************************************************************************
+procedure TBrowserRecord.Move(scroll: Integer);
+begin
+       //\83u\83\89\83E\83U\82ª\95t\82¢\82Ä\82é\82Æ\82«\82¾\82¯\8f\88\97\9d\82·\82é
+       if (Self.Browser <> nil) then begin
+               //\83u\83\89\83E\83U\82ª\83f\81[\83^\82Ì\93Ç\82Ý\8d\9e\82Ý\92\86\82Ì\8e\9e\82Í\93Ç\82Ý\8d\9e\82Ý\82ð\91Ò\82Â
+               while (Self.Browser.ReadyState <> READYSTATE_COMPLETE) and
+                                       (Self.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin
+                       Sleep(1);
+                       Application.ProcessMessages;
+               end;
+
+               try
+                       OleVariant(Self.Browser.Document as IHTMLDocument2).body.scrollTop
+                := OleVariant(Self.Browser.Document as IHTMLDocument2).body.scrollTop
+                    + scroll;
+               except
+               end;
+       end;
+end;
+
 //ID\83A\83\93\83J\81[\92Ç\89Á
 procedure TBrowserRecord.IDAnchorPopup(Abody :string);
 const