OSDN Git Service

ローカルルール関係の基礎作り
[gikonavigoeson/gikonavi.git] / Giko.pas
index 21e1d47..54c6a40 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -28,6 +28,7 @@ type
        TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite);
        TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser);
        TMinimizeType = (mtNone, mtMinimizing, mtMinimized);
+       TResizeType = (rtNone, rtResizing);
 
        TBrowserRecord = class;
 
@@ -527,7 +528,7 @@ type
     N65: TMenuItem;
     BBSSelectPopupMenu: TPopupMenu;
                PlugInMenu: TMenuItem;
-    TmpToolBar: TToolBar;
+       TmpToolBar: TToolBar;
     TreeSelectNameCopy: TAction;
     TreeSelectNamePupupMenu: TMenuItem;
     BrowserPanel: TPanel;
@@ -550,7 +551,7 @@ type
                OpenLogFolder: TMenuItem;
     Browser: TWebBrowser;
     TabSave: TMenuItem;
-    TabOpen: TMenuItem;
+       TabOpen: TMenuItem;
                TabsSaveAction: TAction;
     TabsOpenAction: TAction;
     ResRangePopupMenu: TPopupMenu;
@@ -573,12 +574,14 @@ type
     N69: TMenuItem;
     S7: TMenuItem;
     ThreadRangeButton: TToolButton;
-    TabAutoSaveAction: TAction;
+       TabAutoSaveAction: TAction;
     TabAutoLoadAction: TAction;
+    ListColumnPopupMenu: TPopupMenu;
+    JumpToNumOfResAction: TAction;
+    FavoriteTreeViewCollapseAction: TAction;
                                procedure FormCreate(Sender: TObject);
                procedure FormDestroy(Sender: TObject);
                procedure CabinetPanelHide(Sender: TObject);
-               procedure FormClose(Sender: TObject; var Action: TCloseAction);
                procedure ListViewData(Sender: TObject; Item: TListItem);
                procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
                        const FindString: String; const FindPosition: TPoint;
@@ -806,8 +809,6 @@ type
                procedure SelectComboBoxExit(Sender: TObject);
                procedure SelectResActionExecute(Sender: TObject);
                procedure SelectResActionUpdate(Sender: TObject);
-               procedure FormKeyUp(Sender: TObject; var Key: Word;
-                       Shift: TShiftState);
                procedure AllResActionExecute(Sender: TObject);
                procedure AllResActionUpdate(Sender: TObject);
                procedure ReloadClick(Sender: TObject);
@@ -872,7 +873,7 @@ type
       var Handled: Boolean);
     procedure KoreCopyExecute(Sender: TObject);
     procedure BrowserTabPopupMenuPopup(Sender: TObject);
-    procedure MenuToolBarResize(Sender: TObject);
+       procedure MenuToolBarResize(Sender: TObject);
     procedure StdToolBarResize(Sender: TObject);
     procedure LinkToolBarResize(Sender: TObject);
     procedure ListNameToolBarResize(Sender: TObject);
@@ -895,7 +896,7 @@ type
                procedure SetFocusForBrowserActionUpdate(Sender: TObject);
     procedure SetFocusForThreadListActionExecute(Sender: TObject);
     procedure SetFocusForCabinetActionExecute(Sender: TObject);
-    procedure BrowserMaxAndFocusActionExecute(Sender: TObject);
+       procedure BrowserMaxAndFocusActionExecute(Sender: TObject);
     procedure BrowserMaxAndFocusActionUpdate(Sender: TObject);
     procedure ThreadlistMaxAndFocusActionExecute(Sender: TObject);
     procedure ListViewExit(Sender: TObject);
@@ -918,13 +919,18 @@ type
     procedure OnlyAHundredResActionExecute(Sender: TObject);
     procedure OnlyKokoResActionExecute(Sender: TObject);
     procedure OnlyNewResActionExecute(Sender: TObject);
-    procedure BrowsBoradHeadActionExecute(Sender: TObject);
+       procedure BrowsBoradHeadActionExecute(Sender: TObject);
     procedure BrowsBoradHeadActionUpdate(Sender: TObject);
     procedure EditNGActionExecute(Sender: TObject);
     procedure ThreadRangeActionUpdate(Sender: TObject);
     procedure ThreadRangeActionExecute(Sender: TObject);
-    procedure TabAutoSaveActionExecute(Sender: TObject);
+               procedure TabAutoSaveActionExecute(Sender: TObject);
     procedure TabAutoLoadActionExecute(Sender: TObject);
+               procedure ListViewColumnRightClick(Sender: TObject;
+      Column: TListColumn; Point: TPoint);
+    procedure JumpToNumOfResActionExecute(Sender: TObject);
+    procedure JumpToNumOfResActionUpdate(Sender: TObject);
+    procedure FavoriteTreeViewCollapseActionExecute(Sender: TObject);
        private
                { Private \90é\8c¾ }
         //RoundList : TRoundList;
@@ -972,22 +978,24 @@ type
 
                FDropSpaceNode: TTreeNode;
 
-               FDragTime : Cardinal;   //\83\8a\83\93\83N\82ÌD&D\97p
-               FDragButton : TToolButton;      //\83\8a\83\93\83N\82ÌD&D\97p\82ÉDrag\82µ\82Ä\82éButton\95Û\91
-               FDragWFirst : Boolean;  //WebTab\82ÌD&D\97p
+               FDragTime : Cardinal;                                                           ///< \83\8a\83\93\83N\82ÌD&D\97p
+               FDragButton : TToolButton;                                      ///< \83\8a\83\93\83N\82ÌD&D\97p\82ÉDrag\82µ\82Ä\82éButton\95Û\91
+               FDragWFirst : Boolean;                                                  ///< WebTab\82ÌD&D\97p
 
-               FListViewBackGroundColor : TColor; //ListView\82ÌBackGroundColor
-               FUseOddResOddColor : Boolean; //\8eæ\93¾\83\8c\83X\90\94\82Æ\83X\83\8c\83b\83h\82Ì\83\8c\83X\90\94\82ª\88á\82Á\82½\82Æ\82«\82É\91¼\82Ì\90F\82Å\95\\8e¦
-               FOddColor : TColor;                                      //\82»\82Ì\90F
+               FListViewBackGroundColor : TColor;      ///< ListView\82ÌBackGroundColor
+               FUseOddResOddColor : Boolean;                   ///< \8eæ\93¾\83\8c\83X\90\94\82Æ\83X\83\8c\83b\83h\82Ì\83\8c\83X\90\94\82ª\88á\82Á\82½\82Æ\82«\82É\91¼\82Ì\90F\82Å\95\\8e¦
+               FOddColor : TColor;                                                                     ///< \82»\82Ì\90F
 
-               FSelectResWord  : string;                                       // \83\8c\83X\8di\8d\9e\83\8f\81[\83h
-               FIsIgnoreResize : Boolean;                              // \83\8a\83T\83C\83Y\83C\83x\83\93\83g\82ð\96³\8e\8b\82·\82é\82©\82Ç\82¤\82©
-               FIsMinimize                     : TMinimizeType;        // \8dÅ\8f¬\89»\82µ\82Ä\82¢\82é\8dÅ\92\86\82©
-               FOldFormWidth           : Integer;                              // \92¼\91O\82Ì\83E\83B\83\93\83h\83E\82Ì\95\9d
-               FToolBarSettingSender : TToolBarSettingSenderType;      // \83c\81[\83\8b\83o\81[\90Ý\92è\82ð\83N\83\8a\83b\83N\82µ\82½\83N\81[\83\8b\83o\81[
-               FMouseDownPos           : TPoint;                               // \83u\83\89\83E\83U\83^\83u\82Å\83}\83E\83X\82ð\89\9f\82µ\82½\82Æ\82«\82Ì\8dÀ\95W
+               FSelectResWord  : string;                                               ///< \83\8c\83X\8di\8d\9e\83\8f\81[\83h
+               FIsIgnoreResize : TResizeType;                  ///< \83\8a\83T\83C\83Y\83C\83x\83\93\83g\82ð\96³\8e\8b\82·\82é\82©\82Ç\82¤\82©
+               FIsMinimize                     : TMinimizeType;                ///< \8dÅ\8f¬\89»\82µ\82Ä\82¢\82é\8dÅ\92\86\82©
+               FOldFormWidth           : Integer;                                      ///< \92¼\91O\82Ì\83E\83B\83\93\83h\83E\82Ì\95\9d
+               FToolBarSettingSender : TToolBarSettingSenderType;      ///< \83c\81[\83\8b\83o\81[\90Ý\92è\82ð\83N\83\8a\83b\83N\82µ\82½\83N\81[\83\8b\83o\81[
+               FMouseDownPos           : TPoint;                                       ///< \83u\83\89\83E\83U\83^\83u\82Å\83}\83E\83X\82ð\89\9f\82µ\82½\82Æ\82«\82Ì\8dÀ\95W
                FBrowsers: TList;
-               FResRangeMenuSelect     : Longint;              ///< ResRangeButton \82Å\91I\91ð\82³\82ê\82Ä\82¢\82é\8d\80\96Ú (\83t\83H\81[\83}\83b\83g\82Í ResRange \8cÝ\8a·)
+               FResRangeMenuSelect     : Longint;                      ///< ResRangeButton \82Å\91I\91ð\82³\82ê\82Ä\82¢\82é\8d\80\96Ú (\83t\83H\81[\83}\83b\83g\82Í ResRange \8cÝ\8a·)
+               FStartUp : Boolean;
+               FIsHandledWheel : Boolean;                      ///< \8aù\82É\8eó\82¯\8eæ\82Á\82½ WM_MOUSEWHEEL \82©\82Ç\82¤\82©
                procedure SetBoardTreeNode( inBBS : TBBS );
                function SetCategoryListItem(ABBS2ch: TBBS): Integer;
                function SetBoardListItem(Category: TCategory): Integer;
@@ -1000,7 +1008,7 @@ type
                procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
                procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
 
-               procedure SetActiveList(Obj: TObject);
+
                procedure ListClick;
                procedure ListDoubleClick(Shift: TShiftState);
                procedure BrowserMovement(const AName: string); overload;
@@ -1051,37 +1059,41 @@ type
                procedure BBSMenuItemOnClick( Sender : TObject );
                //
                procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
-               // CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82É\95Û\91
+               /// CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82É\95Û\91
                procedure       SaveCoolBarSettings;
-               // CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82©\82ç\95\9c\8c³
+               /// CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82©\82ç\95\9c\8c³
                procedure       LoadCoolBarSettings;
-               // \8dÅ\8f¬\89»\82³\82ê\82é
+               /// \8dÅ\8f¬\89»\82³\82ê\82é
                procedure OnMinimize;
-               // \8dÅ\8f¬\89»\82³\82ê\82½
+               /// \8dÅ\8f¬\89»\82³\82ê\82½
                procedure OnMinimized;
-               // CoolBar \82ª\83T\83C\83Y\95Ï\8dX\82³\82ê\82½
+               /// CoolBar \82ª\83T\83C\83Y\95Ï\8dX\82³\82ê\82½
                procedure       CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
-               // TreeView \82ª\83N\83\8a\83b\83N\82³\82ê\82½
+               /// TreeView \82ª\83N\83\8a\83b\83N\82³\82ê\82½
                procedure TreeClick( Node : TTreeNode );
-               // TreeView \82ª\83_\83u\83\8b\83N\83\8a\83b\83N\82³\82ê\82½
+               /// TreeView \82ª\83_\83u\83\8b\83N\83\8a\83b\83N\82³\82ê\82½
                procedure TreeDoubleClick( Node : TTreeNode );
-               // \83M\83R\83i\83r\82Ì\83\81\83b\83Z\81[\83W\83\8b\81[\83v\82ð\89¡\8eæ\82è\82µ\82Ü\82·
+               /// \83M\83R\83i\83r\82Ì\83\81\83b\83Z\81[\83W\83\8b\81[\83v\82ð\89¡\8eæ\82è\82µ\82Ü\82·
                procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
-               // \83u\83\89\83E\83U\82Ì\83L\81[\83_\83E\83\93\83C\83x\83\93\83g
-               // \83C\83x\83\93\83g\82ð\8eæ\82è\88µ\82Á\82½\8fê\8d\87\82Í True \82ð\95Ô\82·
+               /// \83u\83\89\83E\83U\82Ì\83L\81[\83_\83E\83\93\83C\83x\83\93\83g
+               /// \83C\83x\83\93\83g\82ð\8eæ\82è\88µ\82Á\82½\8fê\8d\87\82Í True \82ð\95Ô\82·
                function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
-               // \8ae\8f\8a\82É\82 \82é\83L\83\83\83r\83l\83b\83g\81E BBS \83\81\83j\83\85\81[\82ð\83Z\83b\83g\81^\8dX\90V
+               /// \8ae\8f\8a\82É\82 \82é\83L\83\83\83r\83l\83b\83g\81E BBS \83\81\83j\83\85\81[\82ð\83Z\83b\83g\81^\8dX\90V
                procedure SetBBSMenu;
                function WebBrowserClick(Sender: TObject): WordBool;
                procedure SkinorCSSFilesCopy(path: string);
-               // \83^\83u\8eæ\93¾
+               /// \83^\83u\8eæ\93¾
                function GetTabURLs(AStringList: TStringList) : Boolean;
-               // \83^\83u\95Û\91
+               /// \83^\83u\95Û\91
                function SaveTabURLs : Boolean;
-               // \83^\83u\93Ç\82Ý\8fo\82µ
+               /// \83^\83u\93Ç\82Ý\8fo\82µ
                function LoadTabURLs : Boolean;
-               // \83o\83\93\83h\95\9d\82ð\8dÄ\8cv\8eZ\81E\8dÄ\90Ý\92è\82·\82é
+               /// \83o\83\93\83h\95\9d\82ð\8dÄ\8cv\8eZ\81E\8dÄ\90Ý\92è\82·\82é
                procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
+               /// ListView \82Ì Column \82ð\90^\82Ì\83J\83\89\83\80\82É\95Ï\8a·
+               function        ActiveListTrueColumn( column : TListColumn ) : TListColumn;
+               /// ListColumnPopupMenu \83A\83C\83e\83\80\82Ì\83N\83\8a\83b\83N\83C\83x\83\93\83g
+               procedure       ListColumnPopupMenuOnClick( Sender : TObject );
        protected
                procedure CreateParams(var Params: TCreateParams); override;
                procedure WndProc(var Message: TMessage); override;
@@ -1093,8 +1105,11 @@ type
                { Public \90é\8c¾ }
 //             FDownload: TDownload;
                FControlThread: TThreadControl;
-               procedure MoveToURL(URL: string);
-               procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
+               procedure MoveToURL(const inURL: string);
+               function InsertBrowserTab(
+                       ThreadItem      : TThreadItem;
+                       ActiveTab               : Boolean = True
+               ) : TBrowserRecord;
                procedure ReloadBBS;
                function GetHttpState: Boolean;
                procedure SetEnabledCloseButton(Enabled: Boolean);
@@ -1114,7 +1129,7 @@ type
                function GetActiveContent: TThreadItem;
                function GetActiveList: TObject;
 
-               property ActiveList: TObject read GetActiveList write SetActiveList;
+
 //             property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
 
                procedure SetListViewType(AViewType: TGikoViewType); overload;
@@ -1138,16 +1153,19 @@ type
 //             property Favorite: TFavorite read FFavorite write FFavorite;
                procedure SetToolBarPopup;
                procedure ShowFavoriteAddDialog( Item : TObject );
-        procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
-        procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
+               procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
+               procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
                property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
                property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
                property OddColor : TColor read FOddColor write FOddColor;
 
                function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
                procedure OnPlugInMenuItem( Sender : TObject );
-                procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
-
+               procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
+               /// ListView \82Ì\83J\83\89\83\80\95\9d\82¨\82æ\82Ñ\88Ê\92u\82Ì\95Û\91¶ KuroutSetting\82©\82ç\82æ\82Ñ\82¾\82µ\82½\82¢\82Ì\82Å
+               procedure ActiveListColumnSave;
+               procedure SetActiveList(Obj: TObject);
+               property ActiveList: TObject read GetActiveList write SetActiveList;
        published
                property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
        end;
@@ -1176,18 +1194,18 @@ type
        TBrowserRecord = class( TObject )
        private
                FBrowser        : TWebBrowser;
-               FEvent: THTMLDocumentEventSink;//\83u\83\89\83E\83U\83h\83L\83\85\83\81\83\93\83g\83C\83x\83\93\83g
+               FEvent: THTMLDocumentEventSink; //!< \83u\83\89\83E\83U\83h\83L\83\85\83\81\83\93\83g\83C\83x\83\93\83g
                FThread         : TThreadItem;
                FLastSize       : Integer;
                FRepaint        : Boolean;
- //            FOnlyHundred: Boolean;
+               FMovement       : string;                                                       //!< \83X\83N\83\8d\81[\83\8b\90æ\83A\83\93\83J\81[
        public
                destructor      Destroy; override;
                property        Browser : TWebBrowser   read FBrowser   write FBrowser;
                property        Thread  : TThreadItem   read FThread    write FThread;
                property        LastSize        : Integer               read FLastSize  write FLastSize;
                property        Repaint         : Boolean               read FRepaint   write FRepaint;
-//             property        OnlyHundred : Boolean           read FOnlyHundred write FOnlyHundred;
+               property        Movement        : string                read FMovement  write FMovement;
        end;
 
 var
@@ -1248,6 +1266,7 @@ const
        USER_RESIZED            = WM_USER + 2001;
        USER_MINIMIZED                                  = WM_USER + 2002;
        USER_SETLINKBAR                                 = WM_USER + 2003;
+       USER_DOCUMENTCOMPLETE           = WM_USER + 2004;       ///< wParam : TWebBrowser
        SELECTTIME_INTERBAL                             = 110;
 
        BROWSER_COUNT           = 5;    //\83u\83\89\83E\83U\82Ì\90\94
@@ -1285,11 +1304,12 @@ begin
        Writeln(' \8fI\97¹\8e\9e\82Í\81A\83M\83R\83i\83r\83E\83B\83\93\83h\83E\82ð\95Â\82\82Ä\82­\82¾\82³\82¢');
        Writeln('============================================================');
 {$ENDIF}
+       FStartUp := false;
        Application.OnDeactivate := AppFormDeactivate;
        Self.OnDeactivate := AppFormDeactivate;
        Application.HookMainWindow(Hook);
        Application.OnMessage := HandleAppMessage; //\82È\82ñ\82©\96³\82­\82Ä\82à\91å\8fä\95v\82É\82È\82Á\82½\81@by\81@\82à\82\82ã
-       Self.DoubleBuffered := true;
+//     Self.DoubleBuffered := true;
        FTreeType := gttNone;
 
        FSearchDialog := nil;
@@ -1304,13 +1324,14 @@ begin
                newBrowser.Align := alNone;
                newBrowser.Left := 0;
                newBrowser.Top  := 0;
-        //newBrowser.DoubleBuffered := true;
+               newBrowser.StatusBar    := false;
+               newBrowser.MenuBar              := false;
+               newBrowser.AddressBar   := false;
                newBrowser.OnDocumentComplete   := BrowserDocumentComplete;
                newBrowser.OnBeforeNavigate2    := BrowserBeforeNavigate2;
                newBrowser.OnEnter                              := BrowserEnter;
                newBrowser.OnNewWindow2                 := BrowserNewWindow2;
                newBrowser.OnStatusTextChange   := BrowserStatusTextChange;
-               //newBrowser.OnTitleChange              := BrowserTitleChange;
                newBrowser.Navigate(BLANK_HTML);
                ShowWindow(newBrowser.Handle, SW_HIDE);
 
@@ -1319,7 +1340,7 @@ begin
        ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
 
        // \8bN\93®\8e\9e\82É\95Û\91\82³\82ê\82Ä\82µ\82Ü\82¤\91Î\8dô
-       FIsIgnoreResize := True;
+       FIsIgnoreResize := rtResizing;
 
        //\8eè\82Ì\83J\81[\83\\83\8b
        Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
@@ -1328,38 +1349,8 @@ begin
        //\83A\83h\83\8c\83X\97\9a\97ð\93Ç\82Ý\8d\9e\82Ý
        AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
 
-       // \8aO\95\94\94Â\83v\83\89\83O\83C\83\93\82ð\83\8d\81[\83h(ReadBoardFile, LoadHistory \82æ\82è\90æ\82É\8ds\82¤\82±\82Æ)
-       InitializeBoardPlugIns;
-
        EnabledCloseButton := True;
 
-
-       //\8f\84\89ñ\83f\81[\83^\93Ç\82Ý\8d\9e\82Ý
-       RoundList := TRoundList.Create;
-       RoundList.LoadRoundBoardFile;
-
-       // \83{\81[\83h\83t\83@\83C\83\8b\97ñ\8b\93(ReadFavorite \82æ\82è\90æ\82É\8ds\82¤\82±\82Æ)
-       GikoSys.ListBoardFile;
-
-       RoundList.LoadRoundThreadFile;
-
-       if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
-               GikoSys.ListBoardFile;
-
-       // \83\81\83j\83\85\81[\82É\92Ç\89Á
-       SetBBSMenu;
-
-       // \83q\83X\83g\83\8a\83\8a\83X\83g(LoadHistory \82æ\82è\82à\90æ\82É\8ds\82¤\82±\82Æ)
-       FHistoryList := TList.Create;
-
-       // \97\9a\97ð\93Ç\82Ý\8d\9e\82Ý
-       LoadHistory;
-
-       //\82¨\8bC\82É\93ü\82è\93Ç\82Ý\8d\9e\82Ý
-//     FFavorite := TFavorite.Create(FavoriteTreeView);
-       FavoriteDM.SetFavTreeView(FavoriteTreeView);
-       FavoriteDM.ReadFavorite;
-
        //\83\8a\83X\83g\83X\83^\83C\83\8b
        ListView.ViewStyle := GikoSys.Setting.ListStyle;
 
@@ -1403,8 +1394,8 @@ begin
                ListView.Font.Name := GikoSys.Setting.ListFontName;
                ListView.Font.Size := GikoSys.Setting.ListFontSize;
                ListView.Font.Color := GikoSys.Setting.ListFontColor;
-               //ListView.Color := GikoSys.Setting.ListBackColor;
-               ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
+               ListViewBackGroundColor := clWhite;                                                                                             // \83f\83t\83H\83\8b\83g\82É\90Ý\92è\82µ\82½\82Ì\82¿
+               ListViewBackGroundColor := GikoSys.Setting.ListBackColor;       // \83\86\81[\83U\92è\8b`\82É\95Ï\8dX
                FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
                FOddColor := GikoSys.Setting.OddColor;
 
@@ -1472,6 +1463,35 @@ begin
        FBrowserSizeHeight := GikoSys.Setting.ListHeight;
        FBrowserSizeWidth := GikoSys.Setting.ListWidth;
 
+       // \8aO\95\94\94Â\83v\83\89\83O\83C\83\93\82ð\83\8d\81[\83h(ReadBoardFile, LoadHistory \82æ\82è\90æ\82É\8ds\82¤\82±\82Æ)
+       InitializeBoardPlugIns;
+
+       //\8f\84\89ñ\83f\81[\83^\93Ç\82Ý\8d\9e\82Ý
+       RoundList := TRoundList.Create;
+       RoundList.LoadRoundBoardFile;
+
+       // \83{\81[\83h\83t\83@\83C\83\8b\97ñ\8b\93(ReadFavorite \82æ\82è\90æ\82É\8ds\82¤\82±\82Æ)
+       GikoSys.ListBoardFile;
+
+       RoundList.LoadRoundThreadFile;
+
+       if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
+               GikoSys.ListBoardFile;
+
+       // \83\81\83j\83\85\81[\82É\92Ç\89Á
+       SetBBSMenu;
+
+       // \83q\83X\83g\83\8a\83\8a\83X\83g(LoadHistory \82æ\82è\82à\90æ\82É\8ds\82¤\82±\82Æ)
+       FHistoryList := TList.Create;
+
+       // \97\9a\97ð\93Ç\82Ý\8d\9e\82Ý
+       LoadHistory;
+
+       //\82¨\8bC\82É\93ü\82è\93Ç\82Ý\8d\9e\82Ý
+//     FFavorite := TFavorite.Create(FavoriteTreeView);
+       FavoriteDM.SetFavTreeView(FavoriteTreeView);
+       FavoriteDM.ReadFavorite;
+
        ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
        ArrangeAction.Execute;
 
@@ -1668,7 +1688,7 @@ begin
                        if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
                                ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
                        // \8bN\93®\8e\9e\82É\95Û\91\82³\82ê\82Ä\82µ\82Ü\82¤\91Î\8dô 2
-                       FIsIgnoreResize := True;
+                       FIsIgnoreResize := rtResizing;
                        CabinetBBSAction.Execute;
                end;
        end else begin
@@ -1677,7 +1697,7 @@ begin
        end;
 
        // \8bN\93®\8e\9e\82É\95Û\91\82³\82ê\82Ä\82µ\82Ü\82¤\91Î\8dô 3
-       FIsIgnoreResize := True;
+       FIsIgnoreResize := rtResizing;
 
        //\83I\81[\83g\83\8d\83O\83C\83\93
        if GikoSys.Setting.AutoLogin then
@@ -1701,7 +1721,7 @@ begin
        //Samba24\82Ì\83t\83@\83C\83\8b\83`\83F\83b\83N
        GikoSys.SambaFileExists();
 
-        //\83^\83u\8e©\93®\93Ç\82Ý\8d\9e\82Ý (AV\94­\90\82Ì\82½\82ß\88ê\8e\9e\95\95\88ó)
+        //\82É\82¿\82á\82ñ\8cê\83t\83@\83C\83\8b\93Ç\82Ý\8fo\82µ
 end;
 
 // CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82É\95Û\91
@@ -1711,7 +1731,7 @@ var
        CoolSet : TCoolSet;
 begin
 
-       if IsIconic( Handle ) or FIsIgnoreResize then
+       if IsIconic( Handle ) or (FIsIgnoreResize <> rtNone) then
                Exit;
 
        //\83N\81[\83\8b\83o\81[\95Û\91¶(Main)
@@ -1752,7 +1772,7 @@ begin
                for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
                        CoolSet := GikoSys.Setting.MainCoolSet[i];
                        if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
-                               FIsIgnoreResize := False;
+                               FIsIgnoreResize := rtNone;
                                SaveCoolBarSettings;
                                Exit;
                        end;
@@ -1771,7 +1791,7 @@ begin
                for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
                        CoolSet := GikoSys.Setting.ListCoolSet[i];
                        if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
-                               FIsIgnoreResize := False;
+                               FIsIgnoreResize := rtNone;
                                SaveCoolBarSettings;
                                Exit;
                        end;
@@ -1790,7 +1810,7 @@ begin
                for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
                        CoolSet := GikoSys.Setting.BrowserCoolSet[i];
                        if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
-                               FIsIgnoreResize := False;
+                               FIsIgnoreResize := rtNone;
                                SaveCoolBarSettings;
                                Exit;
                        end;
@@ -1809,59 +1829,70 @@ end;
 //
 procedure TGikoForm.FormShow(Sender: TObject);
 begin
-       ShowWindow(Application.Handle, SW_HIDE);
-
-       //FormCreate\82Å\82â\82é\82Æ\89Â\8e\8b\90Ý\92è\82ª\94½\89f\82³\82ê\82È\82¢\8fê\8d\87\82ª\82 \82é\82Ì\82ÅFormShow\82Å\82â\82é\82±\82Æ\82É\82µ\82½
-       //\83c\81[\83\8b\83o\81[\95\\8e¦
-       StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
-       StdToolBarVisibleActionExecute( nil );
-       AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
-       AddressBarVisibleActionExecute( nil );
-       LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
-       LinkBarVisibleActionExecute( nil );
-       ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
-       ListToolBarVisibleActionExecute( nil );
-       ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
-       ListNameBarVisibleActionExecute( nil );
-       BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
-       BrowserToolBarVisibleActionExecute( nil );
-       BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
-       BrowserNameBarVisibleActionExecute( nil );
-
-       //\83u\83\89\83E\83U\83^\83u
-       BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
-       BrowserTabVisibleActionExecute(nil);
-
-       if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
-               BrowserTabTopAction.Checked := True;
-               BrowserTabTopActionExecute(nil);
-       end else begin
-               BrowserTabBottomAction.Checked := True;
-               BrowserTabBottomActionExecute(nil);
-       end;
+       if not FStartUp then begin
+               ShowWindow(Application.Handle, SW_HIDE);
+
+               //FormCreate\82Å\82â\82é\82Æ\89Â\8e\8b\90Ý\92è\82ª\94½\89f\82³\82ê\82È\82¢\8fê\8d\87\82ª\82 \82é\82Ì\82ÅFormShow\82Å\82â\82é\82±\82Æ\82É\82µ\82½
+               //\83c\81[\83\8b\83o\81[\95\\8e¦
+               StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
+               StdToolBarVisibleActionExecute( nil );
+               AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
+               AddressBarVisibleActionExecute( nil );
+               LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
+               LinkBarVisibleActionExecute( nil );
+               ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
+               ListToolBarVisibleActionExecute( nil );
+               ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
+               ListNameBarVisibleActionExecute( nil );
+               BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
+               BrowserToolBarVisibleActionExecute( nil );
+               BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
+               BrowserNameBarVisibleActionExecute( nil );
+
+               //\83u\83\89\83E\83U\83^\83u
+               BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
+               BrowserTabVisibleActionExecute(nil);
 
-       if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
-               BrowserTabTabStyleAction.Checked := True;
-               BrowserTabTabStyleActionExecute(nil);
-       end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
-               BrowserTabButtonStyleAction.Checked := True;
-               BrowserTabButtonStyleActionExecute(nil);
-       end else begin
-               BrowserTabFlatStyleAction.Checked := True;
-               BrowserTabFlatStyleActionExecute(nil);
-       end;
+               if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
+                       BrowserTabTopAction.Checked := True;
+                       BrowserTabTopActionExecute(nil);
+               end else begin
+                       BrowserTabBottomAction.Checked := True;
+                       BrowserTabBottomActionExecute(nil);
+               end;
+
+               if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
+                       BrowserTabTabStyleAction.Checked := True;
+                       BrowserTabTabStyleActionExecute(nil);
+               end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
+                       BrowserTabButtonStyleAction.Checked := True;
+                       BrowserTabButtonStyleActionExecute(nil);
+               end else begin
+                       BrowserTabFlatStyleAction.Checked := True;
+                       BrowserTabFlatStyleActionExecute(nil);
+               end;
+
+               // ListView \82Ì\83w\83b\83_\83h\83\89\83b\83O
+//             ListView.FullDrag := True;
 
-       // CoolBar \95\9c\8c³
-       LoadCoolBarSettings;
+               // CoolBar \95\9c\8c³
+               LoadCoolBarSettings;
 
-       FIsIgnoreResize := False;
+               FIsIgnoreResize := rtNone;
 
-       //TabAutoLoad
-       //FormCrete\82©\82ç\88Ú\93®\81B
-       if GikoSys.Setting.TabAutoLoadSave then begin
-               TabAutoLoadAction.Execute;
-       end;
+               //TabAutoLoad
+               //FormCrete\82©\82ç\88Ú\93®\81B
+               if GikoSys.Setting.TabAutoLoadSave then begin
+                       TabAutoLoadAction.Execute;
+               end;
+                //\82É\82¿\82á\82ñ\8cê\88Ä\93à\83T\83|\81[\83g\8b@\94\
+                if GikoSys.Setting.GengoSupport then begin
+                //\97\\92è\92n
+                //Test\8cü\82¯
+                end;
 
+               FStartUp := true;
+       end;
 end;
 
 procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
@@ -1893,17 +1924,7 @@ begin
 //     Application.OnDeactivate := nil;
 //     Self.OnDeactivate := nil;
        try
-               //column\95\9d
-               if GetActiveList is TBBS then begin
-                       for i := 0 to ListView.Columns.Count - 1 do
-                               GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
-               end else if GetActiveList is TCategory then begin
-                       for i := 0 to ListView.Columns.Count - 1 do
-                               GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
-               end else if GetActiveList is TBoard then begin
-                       for i := 0 to ListView.Columns.Count - 1 do
-                               GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
-               end;
+               ActiveListColumnSave;
        except
        end;
        try
@@ -2080,10 +2101,6 @@ begin
 
 end;
 
-//\83t\83H\81[\83\80\83N\83\8d\81[\83Y
-procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
-begin
-end;
 //\83L\83\83\83r\83l\83b\83g\81~\83{\83^\83\93\83N\83\8a\83b\83N
 procedure TGikoForm.CabinetPanelHide(Sender: TObject);
 begin
@@ -2221,9 +2238,9 @@ begin
                Root.ImageIndex                 := ITEM_ICON_2CH1;
                Root.SelectedIndex      := ITEM_ICON_2CH2;
                Root.Data                                               := inBBS;
-               for i := 0 to inBBS.Count - 1 do begin
+               for i := inBBS.Count - 1 downto 0 do begin
                        Category := TCategory(inBBS.Items[i]);
-                       CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
+                       CategoryNode := TreeView.Items.AddChildFirst(Root, Category.Title);
                        CategoryNode.Data := Category;
                        CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
                        CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
@@ -2236,10 +2253,10 @@ begin
                                Category.CustomSort(BoardSortProc);
                        end;
 
-                       for j := 0 to Category.Count - 1 do begin
+                       for j := Category.Count - 1 downto 0 do begin
                                Board := TBoard(Category.Items[j]);
                                Board.BeginUpdate;
-                               BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
+                               BoardNode := TreeView.Items.AddChildFirst(CategoryNode, Board.Title);
                                BoardNode.Data := Board;
                                //if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
                                if not Board.IsLogFile then begin
@@ -2273,22 +2290,37 @@ begin
 end;
 
 function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
-const
-       COLUMN: array[0..0] of string = ('\83J\83e\83S\83\8a\96¼');
 var
-       ListColumn: TListColumn;
-       i: Integer;
+       TitleColumn     : TListColumn;
+       ListColumn      : TListColumn;
+       i, id, idx      : Integer;
 begin
        ListView.Items.BeginUpdate;
        try
                Screen.Cursor := crHourGlass;
 
                ListView.Columns.Clear;
-               for i := 0 to Length(COLUMN) - 1 do begin
-                       ListColumn := ListView.Columns.Add;
-                       ListColumn.Caption := COLUMN[i];
-                       ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
+               TitleColumn := ListView.Columns.Add;
+               TitleColumn.Caption := GikoBBSColumnCaption[ Ord( gbbscTitle ) ];
+               TitleColumn.Width := GikoSys.Setting.BBSColumnWidth[ Ord( gbbscTitle ) ];
+               idx := 0;
+               for i := 0 to GikoSys.Setting.BBSColumnOrder.Count - 1 do begin
+                       if GikoSys.Setting.BBSColumnOrder[ i ] = gbbscTitle then begin
+                               TitleColumn.Tag := i;
+                               idx := i;
+                       end else begin
+                               id := Ord( GikoSys.Setting.BBSColumnOrder[ i ] );
+                               if (Integer( Low( TGikoBBSColumnID ) ) <= id) and
+                                       (id <= Integer( High( TGikoBBSColumnID ) )) then begin
+                                       ListColumn := ListView.Columns.Add;
+       //                                      ListColumn.Tag := id;
+                                               ListColumn.Tag := i;
+                                       ListColumn.Caption := GikoBBSColumnCaption[ id ];
+                                       ListColumn.Width := GikoSys.Setting.BBSColumnWidth[ id ];
+                               end;
+                       end;
                end;
+               TitleColumn.Index := idx;
 
                ListView.Items.Count := 0;
                ListView.Items.Clear;
@@ -2309,8 +2341,11 @@ begin
 
                FSortIndex := GikoSys.Setting.BBSSortIndex;
                FSortOrder := GikoSys.Setting.BBSSortOrder;
-               if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
-                       ListViewSort(nil, ListView.Column[FSortIndex]);
+               for i := ListView.Columns.Count - 1 downto 0 do begin
+                       idx := ListView.Column[ i ].Tag;
+                       if FSortIndex = Ord( GikoSys.Setting.BBSColumnOrder[ idx ] ) then
+                               ListViewSort( nil, ListView.Column[ i ] );
+               end;
 
                Result := ABBS2ch.Count;
        finally
@@ -2320,22 +2355,37 @@ begin
 end;
 
 function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
-const
-       COLUMN: array[0..2] of string = ('\94Â\96¼', '\8f\84\89ñ\97\\96ñ', '\8eæ\93¾\93ú\8e\9e');
 var
-       ListColumn: TListColumn;
-       i: Integer;
+       TitleColumn     : TListColumn;
+       ListColumn      : TListColumn;
+       i, id, idx      : Integer;
 begin
        ListView.Items.BeginUpdate;
        try
                Screen.Cursor := crHourGlass;
 
                ListView.Columns.Clear;
-               for i := 0 to Length(COLUMN) - 1 do begin
-                       ListColumn := ListView.Columns.Add;
-                       ListColumn.Caption := COLUMN[i];
-                       ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
+               TitleColumn := ListView.Columns.Add;
+               TitleColumn.Caption := GikoCategoryColumnCaption[ Ord( gccTitle ) ];
+               TitleColumn.Width := GikoSys.Setting.CategoryColumnWidth[ Ord( gccTitle ) ];
+               idx := 0;
+               for i := 0 to GikoSys.Setting.CategoryColumnOrder.Count - 1 do begin
+                       if GikoSys.Setting.CategoryColumnOrder[ i ] = gccTitle then begin
+                               TitleColumn.Tag := i;
+                               idx := i;
+                       end else begin
+                               id := Ord( GikoSys.Setting.CategoryColumnOrder[ i ] );
+                               if (Integer( Low( TGikoCategoryColumnID ) ) <= id) and
+                                       (id <= Integer( High( TGikoCategoryColumnID ) )) then begin
+                                       ListColumn := ListView.Columns.Add;
+//                                             ListColumn.Tag := id;
+                                       ListColumn.Tag := i;
+                                       ListColumn.Caption := GikoCategoryColumnCaption[ id ];
+                                       ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[ id ];
+                               end;
+                       end;
                end;
+               TitleColumn.Index := idx;
 
                ListView.Items.Count := 0;
                ListView.Items.Clear;
@@ -2356,8 +2406,11 @@ begin
 
                FSortIndex := GikoSys.Setting.CategorySortIndex;
                FSortOrder := GikoSys.Setting.CategorySortOrder;
-               if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
-                       ListViewSort(nil, ListView.Column[FSortIndex]);
+               for i := ListView.Columns.Count - 1 downto 0 do begin
+                       idx := ListView.Column[ i ].Tag;
+                       if FSortIndex = Ord( GikoSys.Setting.CategoryColumnOrder[ idx ] ) then
+                               ListViewSort( nil, ListView.Column[ i ] );
+               end;
 
                Result := Category.Count;
        finally
@@ -2367,39 +2420,45 @@ begin
 end;
 
 function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
-const
-       COLUMN: array[0..7] of string = ('\83X\83\8c\83b\83h\96¼', '\83J\83E\83\93\83g', '\8eæ\93¾', '\90V\92\85',
-                                                                                                                                        '\96¢\93Ç', '\8f\84\89ñ\97\\96ñ', '\8eæ\93¾\93ú\8e\9e', '\83X\83\8c\8dì\90¬\93ú\8e\9e');
-       COLUMN_NONACQUIREDCOUNT: string = '\96¢\8eæ\93¾';
-       COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
-                                                                                                                                                                                                taRightJustify, taRightJustify,
-                                                                                                                                                                                                taRightJustify, taLeftJustify,
-                                                                                                                                                                                                taLeftJustify, taLeftJustify);
-       //No, \83X\83\8c\83b\83h\96¼, \83J\83E\83\93\83g, \8f\84\89ñ\97\\96ñ, \8eæ\93¾\93ú\8e\9e
-var
-       ListColumn: TListColumn;
-       i: Integer;
+var
+       TitleColumn     : TListColumn;
+       ListColumn      : TListColumn;
+       i, id, idx      : Integer;
 begin
        ListView.Items.BeginUpdate;
        try
                Screen.Cursor := crHourGlass;
 
+{*
                // \83`\83\89\82Â\82«\96h\8e~\82Ì\82½\82ß\81A\95Ï\8dX\82³\82ê\82Ä\82¢\82é\8fê\8d\87\82Ì\82Ý
                // \81¦\96¼\8fÌ\82Í\88á\82¤\82ª\83J\83\89\83\80\90\94\82ª\93¯\82\81A\82Æ\82¢\82Á\82½\8fê\8d\87\82É\91Î\8f\88\82Å\82«\82È\82¢\82Ì\82Å\92\8d\88Ó
-               if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
+               if ListView.Columns.Count <> GikoSys.Setting.BoardColumnOrder.Count then
+*}
                begin
                        ListView.Columns.Clear;
-                       for i := 0 to Length(COLUMN) - 1 do begin
-                               ListColumn := ListView.Columns.Add;
-                               ListColumn.Caption := COLUMN[i];
-                               ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
-                               ListColumn.Alignment := COLUMN_ALIGNMENT[i];
+                       TitleColumn := ListView.Columns.Add;
+                       TitleColumn.Caption := GikoBoardColumnCaption[ Ord( gbcTitle ) ];
+                       TitleColumn.Width := GikoSys.Setting.BoardColumnWidth[ Ord( gbcTitle ) ];
+                       idx := 0;
+                       for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
+                               if GikoSys.Setting.BoardColumnOrder[ i ] = gbcTitle then begin
+                                       TitleColumn.Tag := i;
+                                       idx := i;
+                               end else begin
+                                       id := Ord( GikoSys.Setting.BoardColumnOrder[ i ] );
+                                       if (Integer( Low( TGikoBoardColumnID ) ) <= id) and
+                                               (id <= Integer( High( TGikoBoardColumnID ) )) then begin
+                                               ListColumn := ListView.Columns.Add;
+                                               ListColumn.Caption := GikoBoardColumnCaption[ id ];
+       //                                      ListColumn.Tag := id;
+                                               ListColumn.Tag := i;
+                                               ListColumn.Width := GikoSys.Setting.BoardColumnWidth[ id ];
+                                               ListColumn.Alignment := GikoBoardColumnAlignment[ id ];
+                                       end;
+                               end;
                        end;
+                       TitleColumn.Index := idx;
                end;
-               if GikoSys.Setting.NonAcquiredCount then
-                       ListView.Columns[2].Caption := COLUMN_NONACQUIREDCOUNT
-               else
-                       ListView.Columns[2].Caption := COLUMN[2];
 
                ListView.Items.Count := 0;
                ListView.Items.Clear;
@@ -2417,8 +2476,11 @@ begin
 
                FSortIndex := GikoSys.Setting.BoardSortIndex;
                FSortOrder := GikoSys.Setting.BoardSortOrder;
-               if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
-                       ListViewSort(nil, ListView.Column[FSortIndex]);
+               for i := ListView.Columns.Count - 1 downto 0 do begin
+                       idx := ListView.Column[ i ].Tag;
+                       if FSortIndex = Ord( GikoSys.Setting.BoardColumnOrder[ idx ] ) then
+                               ListViewSort( nil, ListView.Column[ i ] );
+               end;
 
                Result := Board.Count;
        finally
@@ -2438,9 +2500,11 @@ var
        ThreadItem: TThreadItem;
        RepStr: string;
                ActivListObj : TObject;
+       i, idx : Integer;
 begin
        ActivListObj := ActiveList;
        if ActivListObj is TBBS then begin
+               //===== \83J\83e\83S\83\8a\83\8a\83X\83g =====
                BBS := TBBS(ActivListObj);
 
                ListView.StateImages := nil;
@@ -2463,7 +2527,10 @@ begin
 
                Item.ImageIndex := ITEM_ICON_CATEGORY1;
                Item.Data := Category;
+
        end else if ActivListObj is TCategory then begin
+
+               //===== \94Â\83\8a\83X\83g =====
                Category := TCategory(ActivListObj);
 
                ListView.StateImages := nil;
@@ -2484,25 +2551,44 @@ begin
                else
                        Item.Caption := Board.Title;
 
-               if Item.SubItems.Count <> 2 then begin
+               if Item.SubItems.Count <> ListView.Columns.Count then begin
                        Item.SubItems.Clear;
-                       Item.SubItems.Add('');
-                       Item.SubItems.Add('');
+                       for i := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 1 do
+                               Item.SubItems.Add('');
                end;
 
                Item.ImageIndex := ITEM_ICON_BOARD1;
 
-               if Board.Round then
-                       Item.SubItems[0] := Board.RoundName     // '\97\\96ñ'
-               else
-                       Item.SubItems[0] := '';
+               idx := 0;
+               for i := 0 to ListView.Columns.Count - 1 do begin
+                       if GikoSys.Setting.CategoryColumnOrder.Count <= i then
+                               Break;
+//                             case TGikoCategoryColumnID( ListView.Column[ i ].Tag ) of
+                       case GikoSys.Setting.CategoryColumnOrder[ i ] of
+                       gccTitle:
+                               // Item.Caption \82Í SubItems \82É\8aÜ\82Ü\82ê\96³\82¢\82Ì\82Å
+                               Dec( idx );
+
+                       gccRoundName:
+                               if Board.Round then
+                                       Item.SubItems[ idx ] := Board.RoundName // '\97\\96ñ'
+                               else
+                                       Item.SubItems[ idx ] := '';
+
+                       gccLastModified:
+                               if Board.RoundDate = ZERO_DATE then begin
+                                       Item.SubItems[ idx ] := '';
+                               end else
+                                       Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
+                       end;
+                       Inc( idx );
+               end;
 
-               if Board.RoundDate = ZERO_DATE then begin
-                       Item.SubItems[1] := '';
-               end else
-                       Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
                Item.Data := Board;
+
        end else if ActivListObj is TBoard then begin
+
+               //===== \83X\83\8c\83\8a\83X\83g =====
                Board := TBoard(ActivListObj);
 
                if GikoSys.Setting.ListIconVisible then
@@ -2548,15 +2634,10 @@ begin
                RepStr := CustomStringReplace(RepStr, '&amp;', '&' );
                //RepStr := StringReplace(RepStr, '\81\97\81M', ',', [rfReplaceAll]);
 
-               if Item.SubItems.Count <> 7 then begin
+               if Item.SubItems.Count <> ListView.Columns.Count then begin
                        Item.SubItems.Clear;
-                       Item.SubItems.Add('');
-                       Item.SubItems.Add('');
-                       Item.SubItems.Add('');
-                       Item.SubItems.Add('');
-                       Item.SubItems.Add('');
-                       Item.SubItems.Add('');
-            Item.SubItems.Add('');
+                       for i := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 1 do
+                               Item.SubItems.Add('');
                end;
 
                if ListNumberVisibleAction.Checked then
@@ -2572,49 +2653,105 @@ begin
                end;
 
                if ThreadItem.IsLogFile then begin
-                       Item.ImageIndex := ITEM_ICON_THREADLOG1;
-                       Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
-                       if GikoSys.Setting.NonAcquiredCount then
-                               Item.SubItems[1] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count)
-                       else
-                               Item.SubItems[1] := IntToStr(ThreadItem.Count);
-                       if ThreadItem.NewResCount = 0 then
-                               Item.SubItems[2] := ''
-                       else
-                               Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
-                       Item.SubItems[3] := '';
-                       if ThreadItem.Round then
-                               Item.SubItems[4] := ThreadItem.RoundName
-                       else
-                               Item.SubItems[4] := '';
-                       if ThreadItem.RoundDate = ZERO_DATE then begin
-                               Item.SubItems[5] := '';
-                       end else
-                               Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
-                       if ThreadItem.NewArrival then
-                               Item.ImageIndex := ITEM_ICON_THREADNEW1;
-            if ThreadItem.CreateDate = ZERO_DATE then begin
-                               Item.SubItems[6] := '';
-                       end else
-                               Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
+                       idx := 0;
+                       for i := 0 to ListView.Columns.Count - 1 do begin
+                       if GikoSys.Setting.BoardColumnOrder.Count <= i then
+                               Break;
+//                             case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
+                               case GikoSys.Setting.BoardColumnOrder[ i ] of
+                               gbcTitle:
+                                       // Item.Caption \82Í SubItems \82É\8aÜ\82Ü\82ê\96³\82¢\82Ì\82Å
+                                       Dec( idx );
+
+                               gbcAllCount:
+                                       Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
+
+                               gbcLocalCount:
+                                       Item.SubItems[ idx ] := IntToStr(ThreadItem.Count);
+
+                               gbcNonAcqCount:
+                                       Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count);
+
+                               gbcNewCount:
+                                       if ThreadItem.NewResCount = 0 then
+                                               Item.SubItems[ idx ] := ''
+                                       else
+                                               Item.SubItems[ idx ] := IntToStr(ThreadItem.NewResCount);
+
+                               gbcUnReadCount:
+                                       Item.SubItems[ idx ] := '';
+
+                               gbcRoundName:
+                                       if ThreadItem.Round then
+                                               Item.SubItems[ idx ] := ThreadItem.RoundName
+                                       else
+                                               Item.SubItems[ idx ] := '';
+
+                               gbcRoundDate://gbcLastModified:
+                                       if (ThreadItem.RoundDate = ZERO_DATE)  then begin
+                                               Item.SubItems[ idx ] := '';
+                                       end else
+                                               Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
 
+                               gbcCreated:
+                                       if ThreadItem.CreateDate = ZERO_DATE then begin
+                                               Item.SubItems[ idx ] := '';
+                                       end else
+                                               Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
+
+                               gbcLastModified:
+                                       if (ThreadItem.LastModified = ZERO_DATE)  then begin
+                                               Item.SubItems[ idx ] := '';
+                                       end else
+                                               Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.LastModified);
+
+
+                               end;
+                               Inc( idx );
+                       end;
+
+                       if ThreadItem.NewArrival then
+                               Item.ImageIndex := ITEM_ICON_THREADNEW1
+                       else
+                               Item.ImageIndex := ITEM_ICON_THREADLOG1;
                end else begin
-                       Item.ImageIndex := ITEM_ICON_THREAD1;
-                       Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
-                       Item.SubItems[1] := '';
-                       Item.SubItems[2] := '';
-                       Item.SubItems[3] := '';
-                       Item.SubItems[4] := '';
-                       Item.SubItems[5] := '';
-            if not GikoSys.Setting.CreationTimeLogs then
-                               if ThreadItem.CreateDate = ZERO_DATE then
-                                       Item.SubItems[6] := ''
-                               else
-                                       Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
+                       idx := 0;
+                       for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
+//                             case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
+                               case GikoSys.Setting.BoardColumnOrder[ i ] of
+                               gbcTitle:
+                                       // Item.Caption \82Í SubItems \82É\8aÜ\82Ü\82ê\96³\82¢\82Ì\82Å
+                                       Dec( idx );
+
+                               gbcAllCount:
+                                       Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
+
+                               gbcRoundDate://gbcLastModified:
+                                       Item.SubItems[ idx ] := '';
+
+                               gbcCreated:
+                                       if ThreadItem.CreateDate = ZERO_DATE then begin
+                                               Item.SubItems[ idx ] := '';
+                                       end else
+                                               Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
+
+                               gbcLastModified:
+                                       Item.SubItems[ idx ] := '';
+
+                               else
+                                       Item.SubItems[ idx ] := '';
+                               end;
+                               Inc( idx );
+                       end;
 
+                       if ThreadItem.NewArrival then
+                               Item.ImageIndex := ITEM_ICON_THREADNEW1
+                       else
+                               Item.ImageIndex := ITEM_ICON_THREAD1;
                end;
 
                Item.Data := ThreadItem;
+
        end;
 end;
 
@@ -2657,7 +2794,7 @@ var
        ActiveFileName: string;
        e: IHTMLElement;
        Ext: string;
-       buf: string;
+       buf, buf2: string;
        PathRec: TPathRec;
 begin
        if not( TObject(Sender) is TWebBrowser )then
@@ -2740,30 +2877,43 @@ begin
                end else begin
                        threadItem := GetActiveContent;
                        if Pos('about:blank..', Text) = 1 then begin
-                               if AnsiPos('http://jbbs.shitaraba.com/', threadItem.URL) <> 0 then begin
-                                       URL := Copy(threadItem.URL, 1,  LastDelimiter('/',threadItem.URL));
-                                       Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
-                                       if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
-                                               buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
-                                       else if( PathRec.FSt <> 0 ) then
-                                               buf := IntToStr(PathRec.FSt);
-                               end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
-                                       URL := threaditem.URL;
-                                       buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
+                               wkInt := LastDelimiter( '/', threadItem.URL );
+                               if Pos( '?', Copy( threadItem.URL, wkInt, MaxInt ) ) = 0 then begin
+                                       // Thread.URL \82Í PATH_INFO \93n\82µ
+                                       URL := Copy( threadItem.URL, 1,  LastDelimiter( '/', threadItem.URL ) );
+                                       wkInt := LastDelimiter( '/', Text );
+                                       if Pos( '?', Copy( Text, wkInt, MaxInt ) ) = 0 then
+                                               // Text \82à PATH_INFO \93n\82µ
+                                               URL := URL + Copy( Text, LastDelimiter( '/', Text ) + 1, MaxInt )
+                                       else
+                                               // Text \82Í QUERY_STRING \93n\82µ
+                                               URL := URL + Copy( Text, LastDelimiter( '?', Text ) + 1, MaxInt );
                                end else begin
-                                       URL := Copy(threadItem.URL, 1,  LastDelimiter('/',threadItem.URL));
-                                       buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
+                                       // Thread.URL \82Í QUERY_STRING \93n\82µ
+                                       URL := Copy( threadItem.URL, 1,  LastDelimiter( '?', threadItem.URL ) );
+                                       wkInt := LastDelimiter( '/', Text );
+                                       if Pos( '?', Copy( Text, wkInt, MaxInt ) ) = 0 then begin
+                                               // Text \82Í PATH_INFO \93n\82µ
+                                               // URL \82É\94Â\82Æ\83L\81[\82ª\91«\82ç\82È\82¢\82Ì\82Å Text \82©\82ç\92¸\91Õ\82·\82é
+                                               wkInt := LastDelimiter( '/', Copy( Text, 1, wkInt - 1 ) );
+                                               wkInt := LastDelimiter( '/', Copy( Text, 1, wkInt - 1 ) );
+                                               URL := Copy( URL, 1, Length( URL ) - 1 ) + Copy( Text, wkInt, MaxInt );
+                                       end else begin
+                                               // Text \82à QUERY_STRING \93n\82µ
+                                               URL := URL + Copy( Text, LastDelimiter( '?', Text ) + 1, MaxInt )
+                                       end;
                                end;
-                               URL := URL + buf;
                        end else begin
                                URL := Text;
                        end;
+
                        PathRec := Gikosys.Parse2chURL2(URL);
                        if (PathRec.FNoParam) then begin
                                PathRec.FSt := 1;
                                PathRec.FTo := 1;
-                       end else
+                       end else begin
                                Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
+                       end;
                        GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
 
                        if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
@@ -2790,10 +2940,10 @@ begin
                                //      wkIntTo := 1;
                                //if PathRec.FFirst then
                                //      wkIntSt := 1;
-                               if PathRec.FStBegin then
-                                       wkIntSt := 1;
-                               if PathRec.FToEnd then
-                                       wkIntTo := 9999;
+                               //if PathRec.FStBegin then //http://\81`\81`\81`\81`/-50\82Æ\82¢\82¤\82Æ\82«
+                               //      wkIntSt := 1;          //
+                               //if PathRec.FToEnd then   //http://\81`\81`\81`\81`/50-\82Æ\82¢\82¤\82Æ\82«
+                               //      wkIntTo := 9999;       // \82Ç\82¿\82ç\82Ì\8fê\8d\87\82à\81AGetPopupResNumber\82Å\82¤\82Ü\82­\94Ô\8d\86\82ð\92²\90®\82·\82é\82Ì\82Å\82Ó\82æ\82¤\81B
 
                                //ATitle := ActiveFileName <> PathRec.FKey;
                                if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
@@ -2863,22 +3013,44 @@ end;
 
 procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
        Shift: TShiftState);
+var
+       pos     : TPoint;
 begin
        if GetActiveList is TBoard then begin
-               if Key = VK_BACK then begin
-//             UpFolderButtonClick(Sender);
-               end else if Key = VK_SPACE then begin
-                       ListDoubleClick(Shift);
-               end else if Key = VK_RETURN then begin
-                       ListClick;
+               case Key of
+               VK_BACK:;       //      UpFolderButtonClick(Sender);
+               VK_SPACE:                       ListDoubleClick(Shift);
+               VK_RETURN:              ListClick;
+               VK_APPS:
+                       begin
+                               if ListView.Selected <> nil then begin
+                                       pos.X := ListView.Column[ 0 ].Width;
+                                       pos.Y := ListView.Selected.Top;
+                               end else begin
+                                       pos.X := ListView.Left;
+                                       pos.Y := ListView.Top;
+                               end;
+                               Windows.ClientToScreen( ListView.Handle, pos );
+                               ListPopupMenu.Popup( pos.X, pos.Y );
+                       end;
                end;
        end else begin // TBBS, TCategory
-               if Key = VK_BACK then begin
-//             UpFolderButtonClick(Sender);
-               end else if Key = VK_SPACE then begin
-                       ListClick;
-               end else if Key = VK_RETURN then begin
-                       ListDoubleClick(Shift);
+               case Key of
+               VK_BACK:;       //      UpFolderButtonClick(Sender);
+               VK_SPACE:                       ListClick;
+               VK_RETURN:              ListDoubleClick(Shift);
+               VK_APPS:
+                       begin
+                               if ListView.Selected <> nil then begin
+                                       pos.X := ListView.Column[ 0 ].Width;
+                                       pos.Y := ListView.Selected.Top;
+                               end else begin
+                                       pos.X := ListView.Left;
+                                       pos.Y := ListView.Top;
+                               end;
+                               Windows.ClientToScreen( ListView.Handle, pos );
+                               ListPopupMenu.Popup( pos.X, pos.Y );
+                       end;
                end;
        end;
 end;
@@ -2888,34 +3060,95 @@ begin
        Result := FHttpState;
 end;
 
+{*!
+\brief         ListView \82Ì Column \82ð\90^\82Ì\83J\83\89\83\80\82É\95Ï\8a·
+
+Delphi 6 Personal \82Å\82Ì ListView \82Å\82Í ListViewColumnClick \83C\83x\83\93\83g\82Å
+\90³\82µ\82¢\83J\83\89\83\80\82ª\93n\82³\82ê\82È\82¢\82½\82ß\81A\90³\82µ\82¢\83J\83\89\83\80\82É\95Ï\8a·\82µ\82Ü\82·\81B
+*}
+function       TGikoForm.ActiveListTrueColumn( column : TListColumn ) : TListColumn;
+{*
+var
+       i, idx          : Integer;
+       orderList       : TList;
+*}
+begin
+
+       // \90³\82µ\82­\95Ï\8a·\82·\82é\95û\96@\82ª\95ª\82©\82ç\82È\82¢\82Ì\82Å\95Û\97¯
+       Result := column;
+       Exit;
+{*
+       Result := column;
+
+       if TObject( FActiveList ) is TBBS then
+               orderList := GikoSys.Setting.BBSColumnOrder
+       else if TObject( FActiveList ) is TCategory then
+               orderList := GikoSys.Setting.CategoryColumnOrder
+       else if TObject( FActiveList ) is TBoard then
+               orderList := GikoSys.Setting.BoardColumnOrder
+       else
+               Exit;
+
+       idx := column.Tag;
+
+       for i := 0 to ListView.Columns.Count - 1 do begin
+               if Integer( orderList[ ListView.Column[ i ].Tag ] ) = 0 then begin
+                       if idx = 0 then
+                               Result := ListView.Column[ i ]
+                       else if idx <= i then
+                               Result := ListView.Column[ idx - 1 ];
+                       Exit;
+               end;
+       end;
+*}
+
+end;
+
 procedure TGikoForm.ListViewColumnClick(Sender: TObject;
        Column: TListColumn);
 var
-       i: Integer;
-       wkBBS: TBBS;
-       wkCategory: TCategory;
-       wkBoard: TBoard;
+       id, idx                 : Integer;
+       orderList               : TList;
 begin
-       if FSortIndex = Column.Index then
+       idx := ActiveListTrueColumn( Column ).Tag;
+
+       if TObject( FActiveList ) is TBBS then
+               orderList := GikoSys.Setting.BBSColumnOrder
+       else if TObject( FActiveList ) is TCategory then
+               orderList := GikoSys.Setting.CategoryColumnOrder
+       else if TObject( FActiveList ) is TBoard then
+               orderList := GikoSys.Setting.BoardColumnOrder
+       else
+               Exit;
+
+       id := Integer( orderList[ idx ] );
+
+       if FSortIndex = id then
                FSortOrder := not FSortOrder
        else
                FSortOrder := False;
+
        ListViewSort(Sender, Column);
 end;
 
 procedure TGikoForm.ListViewSort(Sender: TObject; Column: TListColumn);
 var
-       i: Integer;
+       i, id, idx      : Integer;
+       orderList               : TList;
        wkBBS: TBBS;
        wkCategory: TCategory;
        wkBoard: TBoard;
 begin
-       for i := 0 to ListView.Columns.Count - 1 do
+       idx := ActiveListTrueColumn( Column ).Tag;
+
+       for i := 0 to ListView.Columns.Count - 1 do begin
                ListView.Column[i].ImageIndex := -1;
+       end;
+
        if FSortOrder then
-               ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
+               ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT1
        else
-               ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
+               ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT2;
 
        Sort.SortNoFlag := ListNumberVisibleAction.Checked;
 
@@ -2923,35 +3156,41 @@ begin
        if TObject( FActiveList ) is TBBS then begin
                //wkBBS := TBBS(TreeView.Selected.Data);
                wkBBS := TBBS( FActiveList );
+               orderList := GikoSys.Setting.BBSColumnOrder;
+               id := Integer( orderList[ idx ] );
                Sort.SortOrder := FSortOrder;
-               Sort.SortIndex := Column.Index;
-               GikoSys.Setting.BBSSortIndex := Column.Index;
+               Sort.SortIndex := id;
+               GikoSys.Setting.BBSSortIndex := id;
                GikoSys.Setting.BBSSortOrder := FSortOrder;
                wkBBS.Sort(CategorySortProc);
-               ListView.Refresh;
        //end else if TObject(TreeView.Selected.Data) is TCategory then begin
        end else if TObject( FActiveList ) is TCategory then begin
                //wkCategory := TCategory(TreeView.Selected.Data);
                wkCategory := TCategory( FActiveList );
+               orderList := GikoSys.Setting.CategoryColumnOrder;
+               id := Integer( orderList[ idx ] );
                Sort.SortOrder := FSortOrder;
-               Sort.SortIndex := Column.Index;
-               GikoSys.Setting.CategorySortIndex := Column.Index;
+               Sort.SortIndex := id;
+               GikoSys.Setting.CategorySortIndex := id;
                GikoSys.Setting.CategorySortOrder := FSortOrder;
                wkCategory.CustomSort(BoardSortProc);
-               ListView.Refresh;
        //end else if TObject(TreeView.Selected.Data) is TBoard then begin
        end else if TObject( FActiveList ) is TBoard then begin
                //wkBoard := TBoard(TreeView.Selected.Data);
                wkBoard := TBoard( FActiveList );
+               orderList := GikoSys.Setting.BoardColumnOrder;
+               id := Integer( orderList[ idx ] );
                Sort.SortOrder := FSortOrder;
-               Sort.SortIndex := Column.Index;
-               Sort.SortNonAcquiredCountFlag := GikoSys.Setting.NonAcquiredCount;
-               GikoSys.Setting.BoardSortIndex := Column.Index;
+               Sort.SortIndex := id;
+               GikoSys.Setting.BoardSortIndex := id;
                GikoSys.Setting.BoardSortOrder := FSortOrder;
                wkBoard.CustomSort(ThreadItemSortProc);
-               ListView.Refresh;
+       end else begin
+               id := 0;
        end;
-       FSortIndex := Column.Index;
+
+       ListView.Refresh;
+       FSortIndex := id;
 end;
 
 procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
@@ -3025,10 +3264,10 @@ begin
        if TObject(Item.Data) is TThreadItem then begin
                ThreadItem := TThreadItem(Item.Data);
                if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
-                                               ListView.Canvas.Brush.Color := FOddColor;
-                               end else begin
-                                       ListView.Canvas.Brush.Color := FListViewBackGroundColor;
-                               end;
+                       ListView.Canvas.Brush.Color := FOddColor;
+               end else begin
+                       ListView.Canvas.Brush.Color := FListViewBackGroundColor;
+               end;
 //             if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
                if ThreadItem.UnRead then
                        TListView(Sender).Canvas.Font.Style := [fsBold];
@@ -3220,6 +3459,7 @@ var
        s: string;
        boardPlugIn : TBoardPlugIn;
        i: Integer;
+       browserRec      : TBrowserRecord;
 begin
        try
                if Item.DownType = gdtBoard then
@@ -3254,21 +3494,27 @@ begin
                                        ATitle := GikoSys.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle;
                                end;
                                for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
-                                       if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then
+                                       if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then begin
                                                TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
+                                               break;
+                                       end;
                                end;
                                if GikoSys.Setting.BrowserTabVisible then begin
                                        if GetActiveContent = Item.ThreadItem then
-                                               InsertBrowserTab(Item.ThreadItem)
+                                               browserRec := InsertBrowserTab(Item.ThreadItem)
                                        else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then
-                                               InsertBrowserTab(Item.ThreadItem, True)
+                                               browserRec := InsertBrowserTab(Item.ThreadItem, True)
                                        else
-                                               InsertBrowserTab(Item.ThreadItem, False);
+                                               browserRec := InsertBrowserTab(Item.ThreadItem, False);
+                                       if browserRec.Thread = BrowserNullTab.Thread then begin
+                                               browserRec.Movement := BrowserNullTab.Movement;
+                                               BrowserNullTab.Movement := '';
+                                       end;
                                end else begin
                                        if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then
                        InsertBrowserTab(Item.ThreadItem);
                                end;
-
+                Application.ProcessMessages;
                                if Item.State = gdsComplete then begin
                                        PlaySound('New');
                                        AddMessageList(ATitle + ' [\83X\83\8c\8eæ\93¾\8a®\97¹]', nil, gmiOK);
@@ -3396,14 +3642,17 @@ begin
        end;
 end;}
 
-procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
-
+function TGikoForm.InsertBrowserTab(
+       ThreadItem      : TThreadItem;
+       ActiveTab               : Boolean = True
+) : TBrowserRecord;
 var
-       i, j, idx: Integer;
-       favItem : TFavoriteThreadItem;
+       i, j, idx               : Integer;
+       favItem                 : TFavoriteThreadItem;
        newBrowser      : TBrowserRecord;
 begin
 
+       Result := nil;
        if Threaditem = nil then Exit;
 
        if ThreadItem.IsLogFile then begin
@@ -3422,6 +3671,7 @@ begin
                for i := 0 to BrowserTab.Tabs.Count - 1 do begin
                        if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin
                                if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
+                                       Result := TBrowserRecord( BrowserTab.Tabs.Objects[i] );
                                        if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin
                                                for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
                                                        if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
@@ -3508,6 +3758,7 @@ begin
                                        BrowserTab.TabIndex := i;
                        end;
                end;
+               Result := newBrowser;
                if(ActiveTab) or (idx = -1) then begin
                        BrowserTab.OnChange(nil);
                end;
@@ -3517,6 +3768,7 @@ begin
                        BrowserNullTab.Browser := Browser;
                end;
                BrowserNullTab.thread := ThreadItem;
+               Result := BrowserNullTab;
                BrowserTab.TabIndex := -1;
                SetContent(BrowserNullTab);
        end;
@@ -3536,7 +3788,6 @@ var
        s: string;
 //     OldCursor: TCursor;
        i: Integer;
-       url: OleVariant;
        idx: Integer;
        ThreadItem: TThreadItem;
        Thread: TBrowserRecord;
@@ -3544,6 +3795,7 @@ var
        ThreadScrollTop: Integer;
        ThreadIsLog, ThreadUnRead, ThreadNewArraical: boolean;
 begin
+//     AddMessageList('SetContent', nil, gmiWhat);
        Thread := inThread;
        idx := BrowserTab.TabIndex;
        if (FActiveContent <> nil) and
@@ -3607,18 +3859,19 @@ begin
 
 
        try
+               {
                if ThreadItem.UnRead then begin
                        ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
                        if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
                        TreeView.Refresh;
                end;
-          //   LockWindowUpdate(Self.Handle);
+        }
                if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin
                        if (FActiveContent.Browser <> BrowserNullTab.Browser) then
                                ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);
                end;
+
                ShowWindow(Thread.FBrowser.Handle, SW_SHOW);
-               //LockWindowUpdate(0);
                if (not Assigned(Thread.Browser.Document)) then begin
                        Thread.Browser.Navigate('about:blank');
                end;
@@ -3645,55 +3898,21 @@ begin
                        Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']';
                        //Thread.Repaint\82Í\81A\83X\83L\83\93\93\99\82Ì\90Ý\92è\82ð\95Ï\8dX\82µ\82½\82Æ\82«\81AThread\82ð\83_\83E\83\93\83\8d\81[\83h\82µ\82½\82Æ\82«
                        //\90V\8bK\82ÉThread\82ð\8aJ\82¢\82½\82Æ\82«\82É\90^\82É\82È\82Á\82Ä\82¢\82é\81B
-//                     if(Thread.Repaint) or (Thread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin
                        if Thread.Repaint then begin
                                //Thread.LastSize := ThreadItem.Size;
                                Thread.Repaint := false;
-                               try
-                                       Thread.Browser.OnStatusTextChange := nil;
-                                       doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
-                                       GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
-
-                       //              if (Assigned(Thread.Browser)) and (Thread.Browser <> nil) then
-                                       Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
-                                       //\82È\82º\82©\82±\82±\82Å\96¾\8e¦\93I\82ÉDocumentComplete\82ð\8cÄ\82Î\82È\82¢\82Æ\82¤\82Ü\82­\82¢\82©\82È\82¢
-                                       //\92Ç\8bL\81@200406/19
-                                       //Visible\82Ì\82Æ\82«\82µ\82©DocumentComplete\82Í\8cÄ\82Î\82ê\82È\82¢\82ç\82µ\82¢
-                                       Thread.FBrowser.OnDocumentComplete(Thread.FBrowser, Thread.FBrowser.Parent, url);
-//                                     Thread.OnlyHundred := GikoSys.OnlyAHundredRes;
-                                       Application.ProcessMessages;
-                                       //\82±\82±\82ÅApplication.ProcessMessages\82ð\8cÄ\82Ô\82±\82Æ\82É\82æ\82Á\82ÄWebBrowser\82ð\8dX\90V\82³\82¹\82é\81B
-                                       //\91\8a\82µ\82È\82¢\82Æ\88ê\89æ\96Ê\95ª\82µ\82©\95`\89æ\82Å\82«\82Ä\82È\82¢\82Ì\82Å\82»\82ê\88È\8fã\82Ì\83X\83N\83\8d\81[\83\8b\97Ê\82ð\8ew\92è\82µ\82Ä\82à\96³\8cø\82É\82È\82é
-                                       //\81@by\82à\82\82ã(2004/01/20)
-                                       try
-                                               //if (Assigned(Thread)) and (Assigned(ThreadItem))then begin
-                                                       if(Thread <> nil) and (ThreadItem <>nil) then begin
-                                                               if ThreadUnRead then
-                                                                       BrowserMovement('new', Thread)
-                                                               else if ThreadScrollTop <> 0 then begin
-                                                                       try
-                                                                               doc.Body.ScrollTop := ThreadScrollTop;
-                                                                       except
-                                                                               on E: Exception do
-                                                                                       MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
-                                                                       end;
-                                                               end;
-                                               //      end;
-                                               end else begin
-                                                       FActiveContent := nil;
-                                                       BrowserTab.Repaint;
-                                                       Exit;
-                                               end;
-                                       except
-                                               FActiveContent := nil;
-                                               BrowserTab.Repaint;
-                                               Exit;
-                                       end;
-                               finally
-                                        //     Application.ProcessMessages;
+
+                               Thread.Browser.OnStatusTextChange := nil;
+                               doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
+                               GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
+                               Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
+                               PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( Thread.Browser ), 0 );
+                               if ThreadItem = nil then begin
+                                       FActiveContent := nil;
+                                       BrowserTab.Repaint;
+                                       Exit;
                                end;
                        end;
-                       ThreadItem.UnRead := False;
                        ListView.Refresh;
                end;
                if (Assigned(Thread)) and (Assigned(Thread.Thread)) and (Thread <> nil) and (ThreadItem <>nil) then begin
@@ -3739,7 +3958,6 @@ end;
 
 procedure TGikoForm.SetActiveList(Obj: TObject);
 var
-       i               : Integer;
        idx     : Integer;
 begin
 //     if FActiveList <> Obj then begin
@@ -3757,13 +3975,11 @@ begin
                Self.Caption := CAPTION_NAME;
                //Application.Title := CAPTION_NAME;
 
+//             ActiveListColumnSave;
+
                if Obj is TBBS then begin
-                       for i := 0 to ListView.Columns.Count - 1 do
-                               ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
                        SetCategoryListItem(TBBS(Obj));
                end else if Obj is TCategory then begin
-                       for i := 0 to ListView.Columns.Count - 1 do
-                               ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
                        SetBoardListItem(TCategory(Obj));
                end else if Obj is TBoard then begin
                        SetThreadListItem(TBoard(Obj));
@@ -3792,12 +4008,16 @@ end;
 procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
 var
        Board: TBoard;
+       i: Integer;
 begin
        if ActiveList is TBoard then begin
+               for i := Length( BBSs ) - 1 downto 0 do begin
+                       BBSs[i].SelectText := SelectText;
+                       BBSs[i].KubetsuChk := KubetsuChk;
+               end;
                Board := TBoard(ActiveList);
-
-               Board.ParentCategory.ParenTBBS.SelectText := SelectText;
-               Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
+//             Board.ParentCategory.ParenTBBS.SelectText := SelectText;
+//             Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
 //             Board.SelectText := SelectText;
 //             Board.KubetsuChk := KubetsuChk;
                ViewType := AViewType;
@@ -4302,75 +4522,70 @@ begin
                bbs := nil;
 
        if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
-               ChangeEvent := nil;
-               ChangingEvent := nil;
+               if Item <> FActiveList then begin
+                       ChangeEvent := nil;
+                       ChangingEvent := nil;
 
-               if not CallEvent then begin
-                       ChangeEvent := TreeView.OnChange;
-                       ChangingEvent := TreeView.OnChanging;
-               end;
-               try
                        if not CallEvent then begin
-                               TreeView.OnChange := nil;
-                               TreeView.OnChanging := nil;
+                               ChangeEvent := TreeView.OnChange;
+                               ChangingEvent := TreeView.OnChanging;
                        end;
-                       //Application.ProcessMessages;
-                       for i := 0 to TreeView.Items.Count - 1 do begin
-                               if TreeView.Items[i].Data = Item then begin
-                                       TreeView.Items[i].Selected := True;
-                                       if CallEvent then
-                                               TreeClick(TreeView.Items[i]);
-                                       Break;
+                       try
+                               if not CallEvent then begin
+                                       TreeView.OnChange := nil;
+                                       TreeView.OnChanging := nil;
+                               end;
+                               //Application.ProcessMessages;
+                               for i := 0 to TreeView.Items.Count - 1 do begin
+                                       if TreeView.Items[i].Data = Item then begin
+                                               TreeView.Items[i].Selected := True;
+                                               if CallEvent then
+                                                       TreeClick(TreeView.Items[i]);
+                                               Break;
+                                       end;
+                               end;
+                               //Application.ProcessMessages;
+                       finally
+                               if not CallEvent then begin
+                                       TreeView.OnChange := ChangeEvent;
+                                       TreeView.OnChanging := ChangingEvent;
                                end;
-                       end;
-                       //Application.ProcessMessages;
-               finally
-                       if not CallEvent then begin
-                               TreeView.OnChange := ChangeEvent;
-                               TreeView.OnChanging := ChangingEvent;
                        end;
                end;
        end else begin
-               if GetActiveList is TBBS then begin
-                       for i := 0 to ListView.Columns.Count - 1 do
-                               GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
-               end else if GetActiveList is TCategory then begin
-                       for i := 0 to ListView.Columns.Count - 1 do
-                               GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
-               end else if GetActiveList is TBoard then begin
-                       for i := 0 to ListView.Columns.Count - 1 do
-                               GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
-               end;
-
-               if (Item is TBBS) or (Item is TCategory) then begin
-                       ListView.Columns.Clear;
-                       SetActiveList( Item );
-               end else if Item is TBoard then begin
-                       if not TBoard( Item ).IsThreadDatRead then begin
-                               Screen.Cursor := crHourGlass;
-                               try
-                                       if not TBoard( Item ).IsThreadDatRead then
-                                               GikoSys.ReadSubjectFile(TBoard( Item ));
-                               finally
-                                       Screen.Cursor := crDefault;
+               if Item <> FActiveList then begin
+                       ActiveListColumnSave;
+
+                       if (Item is TBBS) or (Item is TCategory) then begin
+                               ListView.Columns.Clear;
+                               SetActiveList( Item );
+                       end else if Item is TBoard then begin
+                               if not TBoard( Item ).IsThreadDatRead then begin
+                                       Screen.Cursor := crHourGlass;
+                                       try
+                                               if not TBoard( Item ).IsThreadDatRead then
+                                                       GikoSys.ReadSubjectFile(TBoard( Item ));
+                                       finally
+                                               Screen.Cursor := crDefault;
+                                       end;
                                end;
+                               SetActiveList( Item );
                        end;
-                       SetActiveList( Item );
                end;
+       end;
 
-               if Item is TBoard then begin // not TCategory
-                       if GikoSys.Setting.ListOrientation = gloHorizontal then begin
-                               if GikoSys.Setting.ListWidthState = glsMax then begin
-                                       BrowserMinAction.Execute;
-                                       if GikoForm.Visible then
-                                               ListView.SetFocus;
-                               end;
-                       end else begin
-                               if GikoSys.Setting.ListHeightState = glsMax then begin
-                                       BrowserMinAction.Execute;
-                                       if GikoForm.Visible then
-                                               ListView.SetFocus;
-                               end;
+       if Item is TBoard then begin // not TCategory
+               if GikoSys.Setting.ListOrientation = gloHorizontal then begin
+                       if GikoSys.Setting.ListWidthState = glsMax then begin
+                               BrowserMinAction.Execute;
+                               if GikoForm.Visible then
+                                       ListView.SetFocus;
+                       end;
+               end else begin
+                       if GikoSys.Setting.ListHeightState = glsMax then begin
+                               BrowserMinAction.Execute;
+                               if GikoForm.Visible then
+                                       ListView.SetFocus;
                        end;
                end;
        end;
@@ -4381,6 +4596,7 @@ procedure TGikoForm.ListViewMouseDown(Sender: TObject;
 var
        listItem                : TListItem;
        threadItem      : TThreadItem;
+       pos                                     : TPoint;
 //     t: Cardinal;
 begin
        case Button of
@@ -4404,6 +4620,13 @@ begin
                        else
                                ListClick;
                end;
+       mbRight:
+               begin
+                       pos.X := X;
+                       pos.Y := Y;
+                       Windows.ClientToScreen( ListView.Handle, pos );
+                       ListPopupMenu.Popup( pos.X, pos.Y );
+               end;
        end;
 {      if ssDouble in Shift then begin
                DoubleClickOccurred[Button] := True;
@@ -4530,11 +4753,11 @@ begin
                        top := 0;
                        nm := AName;
                        item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
+                       item.focus();
                        repeat
                                top := top + item.offsetTop;
                                item := item.offsetParent;
                        until AnsiCompareText(item.tagName, 'body' ) = 0;
-
                        OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
                except
                end;
@@ -4562,6 +4785,7 @@ begin
                        top := 0;
                        nm := AName;
                        item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
+            item.focus();
                        repeat
                                top := top + item.offsetTop;
                                item := item.offsetParent;
@@ -5033,15 +5257,23 @@ begin
                case GikoSys.Setting.ListWidthState of
                        glsMax: begin
                                //\92Ê\8fí\95\\8e¦\82É\82·\82é
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0);  //\95`\89æ\92â\8e~
                                ViewPanel.Width := FBrowserSizeWidth;
                                BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
                                BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
                                GikoSys.Setting.ListWidthState := glsNormal;
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0);  //\95`\89æ
                        end;
                        glsMin, glsNormal: begin
                                //\8dÅ\91å\95\\8e¦\82É\82·\82é
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0);  //\95`\89æ\92â\8e~
                                if GikoSys.Setting.ListWidthState = glsNormal then
                                        FBrowserSizeWidth := ViewPanel.Width;
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0);  //\95`\89æ
                                ViewPanel.Width := 1;
                                BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
                                BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
@@ -5052,15 +5284,23 @@ begin
                case GikoSys.Setting.ListHeightState of
                        glsMax: begin
                                //\92Ê\8fí\95\\8e¦\82É\82·\82é
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0);  //\95`\89æ\92â\8e~
                                ViewPanel.Height := FBrowserSizeHeight;
                                BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
                                BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
                                GikoSys.Setting.ListHeightState := glsNormal;
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0);  //\95`\89æ
                        end;
                        glsMin, glsNormal: begin
                                //\8dÅ\91å\95\\8e¦\82É\82·\82é
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0);  //\95`\89æ\92â\8e~
                                if GikoSys.Setting.ListHeightState = glsNormal then
                                        FBrowserSizeHeight := ViewPanel.Height;
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0);  //\95`\89æ
                                ViewPanel.Height := 1;
                                BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
                                BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
@@ -5081,8 +5321,12 @@ begin
                case GikoSys.Setting.ListWidthState of
                        glsMax, glsNormal: begin
                                //\8dÅ\8f¬\95\\8e¦\82É\82·\82é
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0);  //\95`\89æ\92â\8e~
                                if GikoSys.Setting.ListWidthState = glsNormal then
                                        FBrowserSizeWidth := ViewPanel.Width;
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0);  //\95`\89æ
                                ViewPanel.Width := ThreadMainPanel.Width - 80;
                                BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
                                BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
@@ -5090,29 +5334,41 @@ begin
                        end;
                        glsMin: begin
                                //\92Ê\8fí\95\\8e¦\82É\82·\82é
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0);  //\95`\89æ\92â\8e~
                                ViewPanel.Width := FBrowserSizeWidth;
                                BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
                                BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
                                GikoSys.Setting.ListWidthState := glsNormal;
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0);  //\95`\89æ
                        end;
                end;
        end else begin
                case GikoSys.Setting.ListHeightState of
                        glsMax, glsNormal: begin
                                //\8dÅ\8f¬\95\\8e¦\82É\82·\82é
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0);  //\95`\89æ\92â\8e~
                                if GikoSys.Setting.ListHeightState = glsNormal then
                                        FBrowserSizeHeight := ViewPanel.Height;
                                ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
                                BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
                                BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
                                GikoSys.Setting.ListHeightState := glsMin;
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0);  //\95`\89æ
                        end;
                        glsMin: begin
                                //\92Ê\8fí\95\\8e¦\82É\82·\82é
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0);  //\95`\89æ\92â\8e~
                                ViewPanel.Height := FBrowserSizeHeight;
                                BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
                                BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
                                GikoSys.Setting.ListHeightState := glsNormal;
+                               if FActiveContent <> nil then
+                                       SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0);  //\95`\89æ
                        end;
                end;
        end;
@@ -5142,7 +5398,6 @@ procedure TGikoForm.EditorActionExecute(Sender: TObject);
 var
        Editor: TEditorForm;
        Item: TThreadItem;
-       msg: string;
 begin
        Item := GetActiveContent;
        if Item = nil then Exit;
@@ -5334,9 +5589,8 @@ begin
 end;
 
 procedure TGikoForm.FormResize(Sender: TObject);
-var
-       doc                                             : Variant;
 begin
+
        MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
        MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
 
@@ -5352,17 +5606,10 @@ begin
                end;
        end;
 
-       if FIsMinimize = mtMinimized then begin
-               if FActiveContent <> nil then begin
-                       //Application.ProcessMessages;
-                       doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
-                       doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
-                       FIsMinimize := mtNone;
-               end;
-       end;
-
-       FIsIgnoreResize := True;
+       FIsIgnoreResize := rtResizing;
        PostMessage( Handle, USER_RESIZED, 0, 0 );
+
+
 end;
 
 procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
@@ -5450,8 +5697,8 @@ end;
 
 procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
 const
-       DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
-       DEL_SAME_MSG = '\82±\82ê\82ç ^0 \8cÂ\82Ì\83X\83\8c\83b\83h\82Ì\83\8d\83O\82ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+       DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+       DEL_SAME_MSG = '\82±\82ê\82ç ^0 \8cÂ\82Ì\83X\83\8c\83b\83h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
        DEL_TITLE = '\8dí\8f\9c\8am\94F';
 var
        ThreadItem: TThreadItem;
@@ -5488,6 +5735,8 @@ begin
                        DeleteHistory(ThreadItem);
                        DeleteTab(ThreadItem);
                        ThreadItem.DeleteLogFile;
+                       
+                       TreeView.Refresh;       // UnRead \82Ì\95\\8e¦\82ð\8dX\90V
                end;
                ListView.Refresh;
        finally
@@ -5664,7 +5913,6 @@ procedure TGikoForm.KokoResActionExecute(Sender: TObject);
 var
        Editor: TEditorForm;
        Item: TThreadItem;
-       msg: string;
        Number: Integer;
 begin
        Number := KokoPopupMenu.Tag;
@@ -5674,6 +5922,7 @@ begin
 
        Editor := TEditorForm.Create(Self);
        Editor.SetThreadItem(Item);
+    GikoSys.LoadEditorKeySetting(Editor.ActionList);
        Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
        Editor.Show;
        Editor.BodyEdit.SetFocus;
@@ -6409,11 +6658,13 @@ var
        FDispHtmlDocument: DispHTMLDocument;
        BrowserRecord :TBrowserRecord;
        i :Integer;
+       doc                                     : Variant;
+       threadItem      : TThreadItem;
 begin
-//     AddMessageList('DocumentComplete', nil);
+//     AddMessageList('DocumentComplete', nil, gmiWhat);
        if TObject(Sender) is TWebBrowser then begin
+               BrowserRecord := nil;
                if TWebBrowser(Sender) <> Browser then begin
-                       BrowserRecord := nil;
                        for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
                                if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin
                                                BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]);
@@ -6429,7 +6680,7 @@ begin
                                BrowserRecord.FEvent.OnClick := WebBrowserClick;  //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
                        end;
                end else begin
-               if GetActiveContent <> nil then begin
+                       if GetActiveContent <> nil then begin
                                FDispHtmlDocument := Idispatch(OleVariant(Browser.ControlInterface).Document) as DispHTMLDocument;
                                if FEvent <> nil then
                                        FEvent.Free;
@@ -6438,6 +6689,38 @@ begin
                                FEvent.OnClick := WebBrowserClick;  //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
                        end;
                end;
+
+               if (BrowserRecord <> nil) and
+                        Assigned( BrowserRecord.Thread ) then begin
+                       threadItem := BrowserRecord.Thread;
+
+                       if (BrowserRecord <> nil) and (Length( BrowserRecord.Movement ) > 0) then begin
+                               if threadItem.UnRead then begin
+                                       threadItem.UnRead := False;
+                                       threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
+                                       if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
+                                       TreeView.Refresh;
+                                       ListView.Refresh;
+                               end;
+                               BrowserMovement( BrowserRecord.Movement, BrowserRecord );
+                               BrowserRecord.Movement := '';
+                       end else if threadItem.UnRead then begin
+                               threadItem.UnRead := False;
+                               threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
+                               if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
+                               TreeView.Refresh;
+                               BrowserMovement( 'new', BrowserRecord );
+                               ListView.Refresh;
+                       end else if threadItem.ScrollTop <> 0 then begin
+                               try
+                                       doc := Idispatch( OleVariant( BrowserRecord.Browser.ControlInterface ).Document ) as IHTMLDocument2;
+                                       doc.Body.ScrollTop := threadItem.ScrollTop;
+                               except
+                                       on E: Exception do
+                                               MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
+                               end;
+                       end;
+               end;
        end;
 end;
 
@@ -6793,7 +7076,7 @@ end;
 
 procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
 const
-       DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+       DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
        DEL_TITLE = '\8dí\8f\9c\8am\94F';
 var
        idx: Integer;
@@ -7211,14 +7494,13 @@ begin
        end;
 end;
 
-procedure TGikoForm.MoveToURL(URL: string);
-
+procedure TGikoForm.MoveToURL(const inURL: string);
 var
        protocol, host, path, document, port, bookmark : string;
-       URL2, protocol2, host2, path2, document2, port2, bookmark2 : string;
+       URL, protocol2, host2, path2, document2, port2, bookmark2 : string;
        tmp1, tmp2: string;
        BBSID, BBSKey: string;
-       Board: TBoard;
+       tmpBoard, Board: TBoard;
        ThreadItem: TThreadItem;
        i, bi                                   : Integer;
        boardURL                        : string;
@@ -7228,20 +7510,22 @@ var
 //     boardNode                       : TTreeNode;
        shiftDown                       : Boolean;
        ctrlDown                        : Boolean;
+       stRes, edRes    : Int64;
+       browserRec              : TBrowserRecord;
 begin
 
-       GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
-       GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
+       GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark );
+       GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey );
 
 
        shiftDown       := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
-    ctrlDown   := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
-    if shiftDown then begin
-       GikoSys.OpenBrowser(URL, gbtUserApp);
-        Exit;
-    end else if ctrlDown then begin
-       GikoSys.OpenBrowser(URL, gbtIE);
-        Exit;
+       ctrlDown        := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
+       if shiftDown then begin
+               GikoSys.OpenBrowser(inURL, gbtUserApp);
+               Exit;
+       end else if ctrlDown then begin
+               GikoSys.OpenBrowser(inURL, gbtIE);
+               Exit;
        end;
 
        //===== \83v\83\89\83O\83C\83\93
@@ -7250,15 +7534,16 @@ begin
                bi := High( BoardPlugIns );
                for i := Low( BoardPlugIns ) to bi do begin
                        if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
-                               case BoardPlugIns[ i ].AcceptURL( URL ) of
+                               case BoardPlugIns[ i ].AcceptURL( inURL ) of
                                atThread:
                                        begin
-                                               tmpThread               := TThreadItem.Create( BoardPlugIns[ i ], URL );
+                                               tmpThread               := TThreadItem.Create( BoardPlugIns[ i ], inURL );
                                                boardURL                := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
                                                Board                           := BBSsFindBoardFromURL( boardURL );
                                                if Board = nil then begin
+                            //break;
                                                        // \81¦\8dì\82Á\82Ä\82à\92Ç\89Á\82·\82é\82Æ\82±\82ë\82ª\96³\82¢\82Ì\82Å\8c\83\82µ\82­\95Û\97¯
-                                                       //GikoSys.OpenBrowser(URL, gbtUserApp);
+                                                       //GikoSys.OpenBrowser(inURL, gbtUserApp);
                                                        //Exit;
                                                        {
                                                        Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
@@ -7270,34 +7555,42 @@ begin
                                                                GikoSys.ReadSubjectFile( Board );
                                                                Exit;
                                                        end;
-                                               end;
-
-                                               ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
-                                               if ThreadItem = nil then begin
-                                                       ThreadItem := tmpThread;
-                                                       Board.Insert( 0, ThreadItem );
-                                                       if ActiveList is TBoard then begin
-                                                               if TBoard(ActiveList) = Board then
-                                                                       ListView.Items.Count := ListView.Items.Count + 1;
-                                                       end;
-                                                       InsertBrowserTab( ThreadItem );
-                                                       DownloadContent( ThreadItem );
-                                                       Exit;
-                                               end else begin
-                                                       tmpThread.Free;
-                                                       InsertBrowserTab( ThreadItem );
-                                                       if not ThreadItem.IsLogFile then begin
+                                                       ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
+                                                       if ThreadItem = nil then begin
+                                                               ThreadItem := tmpThread;
+                                                               Board.Insert( 0, ThreadItem );
+                                                               if ActiveList is TBoard then begin
+                                                                       if TBoard(ActiveList) = Board then
+                                                                               ListView.Items.Count := ListView.Items.Count + 1;
+                                                               end;
+                                                               GikoSys.GetPopupResNumber( inURL, stRes, edRes );
+                                                               browserRec := InsertBrowserTab( ThreadItem );
+                                                               if (browserRec <> nil) and (stRes > 0) then
+                                                                       browserRec.Movement := IntToStr( stRes );
                                                                DownloadContent( ThreadItem );
+                                                               Exit;
+                                                       end else begin
+                                                               tmpThread.Free;
+                                                               GikoSys.GetPopupResNumber( inURL, stRes, edRes );
+                                                               browserRec := InsertBrowserTab( ThreadItem );
+                                                               if ThreadItem.IsLogFile then begin
+                                                                       if (browserRec <> nil) and (stRes > 0) then
+                                                                               BrowserMovement( IntToStr( stRes ), browserRec );
+                                                               end else begin
+                                                                       if (browserRec <> nil) and (stRes > 0) then
+                                                                               browserRec.Movement := IntToStr( stRes );
+                                                                       DownloadContent( ThreadItem );
+                                                               end;
+                                                               Exit;
                                                        end;
-                                                       Exit;
                                                end;
-
-                                               //Exit;
                                        end;
 
                                atBoard:
                                        begin
-                                               Board := BBSsFindBoardFromURL( URL );
+                                               tmpBoard := TBoard.Create(BoardPlugIns[ i ], inURL);
+                                               Board := BBSsFindBoardFromURL( tmpBoard.URL );
+                                               tmpBoard.Free;
                                                if Board <> nil then begin
                                                        if FActiveBBS <> Board.ParentCategory.ParenTBBS then
                                                                ShowBBSTree( Board.ParentCategory.ParenTBBS );
@@ -7314,7 +7607,7 @@ begin
 
 
        if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
-               boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
+               boardURL := GikoSys.Get2chThreadURL2BoardURL( inURL );
                Board := BBSsFindBoardFromURL( boardURL );
                if Board = nil then
                        Board := BBSsFindBoardFromBBSID( BBSID );
@@ -7326,23 +7619,23 @@ begin
                end;
                if Board = nil then begin
                         // \93ü\82é\82×\82«\94Â\82ª\8c©\82Â\82©\82ç\82È\82©\82Á\82½\82Ì\82Å\81A\95\81\92Ê\82Ì\83u\83\89\83E\83U\82Å\8aJ\82­
-                        GikoSys.OpenBrowser(URL, gbtUserApp);
+                        GikoSys.OpenBrowser(inURL, gbtUserApp);
                         Exit;
                end else begin
                        // \8aO\95\94\82Ì\94Â\82È\82Ì\82É2ch\82ÌURL\82É\82³\82ê\82Ä\82µ\82Ü\82Á\82½\93z\82ð\82±\82±\82Å\8am\94F\82·\82é
-                       URL2 :=  Board.URL;
-                       GikoSys.ParseURI(URL2 , protocol2, host2, path2, document2, port2, bookmark2 );
+                       URL :=  Board.URL;
+                       GikoSys.ParseURI(URL , protocol2, host2, path2, document2, port2, bookmark2 );
                        tmp1 := Copy(host, AnsiPos('.', host) + 1, Length(host));
                        tmp2 := Copy(host2, AnsiPos('.', host2) + 1, Length(host2));
-                       if (tmp1 <> tmp2) then begin
-                               GikoSys.OpenBrowser(URL, gbtUserApp);
+                       if ( not GikoSys.Is2chHost(tmp1)) and (tmp1 <> tmp2) then begin
+                               GikoSys.OpenBrowser(inURL, gbtUserApp);
                                Exit;
                        end;
                end;
 
                if not Board.IsThreadDatRead then
                        GikoSys.ReadSubjectFile(Board);
-               URL := GikoSys.Get2chBrowsableThreadURL( URL );
+               URL := GikoSys.Get2chBrowsableThreadURL( inURL );
                ThreadItem := Board.FindThreadFromURL( URL );
                //\81@\89ß\8b\8e\83\8d\83O\91q\8cÉ\82©\82ç\81A\83_\83E\83\\82µ\82½\83X\83\8c\82ª\94­\8c©\82Å\82«\82È\82¢\82Ì\82Å\82±\82±\82Å\92T\82·\82æ\82¤\82É\82·\82é (2004/01/22)
                if ThreadItem = nil then begin
@@ -7355,9 +7648,9 @@ begin
                        {shiftDown      := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
                        ctrlDown        := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
                        if shiftDown then
-                               GikoSys.OpenBrowser(URL, gbtUserApp)
+                               GikoSys.OpenBrowser(URL1, gbtUserApp)
                        else if ctrlDown then
-                               GikoSys.OpenBrowser(URL, gbtIE)
+                               GikoSys.OpenBrowser(URL1, gbtIE)
                        else begin
                        }
                        ThreadItem := TThreadItem.Create( nil, URL );
@@ -7371,25 +7664,34 @@ begin
                                if TBoard(ActiveList) = Board then
                                        ListView.Items.Count := ListView.Items.Count + 1;
                        end;
-                       InsertBrowserTab(ThreadItem);
+                       GikoSys.GetPopupResNumber( inURL, stRes, edRes );
+                       browserRec := InsertBrowserTab(ThreadItem);
+                       if (browserRec <> nil) and (stRes > 0) then
+                               browserRec.Movement := IntToStr( stRes );
                        DownloadContent(ThreadItem);
                        {end;}
                end else begin
-                       if ThreadItem.IsLogFile then
-                               InsertBrowserTab(ThreadItem)
-                       else begin
+                       if ThreadItem.IsLogFile then begin
+                               GikoSys.GetPopupResNumber( inURL, stRes, edRes );
+                               browserRec := InsertBrowserTab(ThreadItem);
+                               if (browserRec <> nil) and (stRes > 0) then
+                                       browserRec.Movement := IntToStr( stRes );
+                       end else begin
                                if AnsiPos(Host, Board.URL) = 0 then
                                        ThreadItem.DownloadHost := Host
                                else
                                        ThreadItem.DownloadHost := '';
-                               InsertBrowserTab(ThreadItem);
+                               GikoSys.GetPopupResNumber( inURL, stRes, edRes );
+                               browserRec := InsertBrowserTab(ThreadItem);
+                               if (browserRec <> nil) and (stRes > 0) then
+                                       browserRec.Movement := IntToStr( stRes );
                                DownloadContent(ThreadItem);
                        end;
                end;
        end else begin
-    Board := BBSsFindBoardFromURL( URL );
+               Board := BBSsFindBoardFromURL( inURL );
     if Board = nil then begin
-                       GikoSys.OpenBrowser(URL, gbtAuto);
+                       GikoSys.OpenBrowser(inURL, gbtAuto);
     end else begin
          if FActiveBBS <> Board.ParentCategory.ParenTBBS then
         ShowBBSTree( Board.ParentCategory.ParenTBBS );
@@ -7435,6 +7737,9 @@ begin
 end;
 
 procedure TGikoForm.WndProc(var Message: TMessage);
+var
+       senderBrowser   : TWebBrowser;
+       url                                             : OleVariant;
 begin
        try
                case Message.Msg of
@@ -7452,6 +7757,12 @@ begin
                        OnMinimized;
                USER_SETLINKBAR:
                        SetLinkBar;
+               USER_DOCUMENTCOMPLETE:
+                       if (Message.WParam <> 0) and
+                                (TObject(Message.WParam) is TWebBrowser) then begin
+                               senderBrowser := TWebBrowser( Message.WParam );
+                               BrowserDocumentComplete( senderBrowser, senderBrowser.Parent, url );
+                       end;
                end;
 
                inherited;
@@ -7906,10 +8217,10 @@ var
        j: Integer;
        ToolButton: TLinkToolButton;
        MenuItem: TMenuItem;
-       oldIgnoreResize : Boolean;
+       oldIgnoreResize : TResizeType;
 begin
        oldIgnoreResize := FIsIgnoreResize;
-       FIsIgnoreResize := True;
+       FIsIgnoreResize := rtResizing;
        MainCoolBar.Bands.BeginUpdate;
        try
                LinkBarPopupMenu.Items.Clear;
@@ -8002,7 +8313,7 @@ begin
                        if FDropSpaceNode <> nil then
                                FDropSpaceNode.Free;
 
-                       FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
+                       FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObjectFirst(Node.Parent, '', nil );
                        FDropSpaceNode.MoveTo( Node, naInsert );
                        FDropSpaceNode.ImageIndex := -1;
                        FDropSpaceNode.SelectedIndex := -1;
@@ -8368,7 +8679,7 @@ begin
                end;
        end;
        // \90Ý\92è
-       lResult := SendMessage( bar.Handle, RB_SETBANDINFO, i, Integer( pBandInfo ) );
+       lResult := SendMessage( bar.Handle, RB_SETBANDINFO, idx, Integer( pBandInfo ) );
 
 end;
 
@@ -8613,12 +8924,11 @@ procedure TGikoForm.FormMouseWheel(Sender: TObject; Shift: TShiftState;
 var
        Wnd: THandle;
        delta: Integer;
-//     msg: TMessage;
+//     browserPos : TPoint;
 const
        ICON_SIZE = 16;
 begin
-       Handled := False;
-       Wnd := WindowFromPoint(MousePos);
+       Wnd := WindowFromPoint(Mouse.CursorPos);
        Handled := True;
        if WheelDelta > 0 then
                Delta := -1
@@ -8628,13 +8938,42 @@ begin
        if (Wnd = BrowserTab.Handle) or
                 (Wnd = BrowserTab.Parent.Handle) then begin
                BrowserTab.ScrollTabs(Delta);
-       end else if Wnd = ListView.Handle then begin
-               if ListView.ViewStyle = vsList then
-                       ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
-               else
-                       ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
        end else begin
-               Handled := False;
+               if FIsHandledWheel then begin
+                       FIsHandledWheel := False;
+                       Handled := False;
+               end else begin
+                       FIsHandledWheel := True;
+                       if (Wnd = TreeView.Handle) or  (Wnd = FavoriteTreeView.Handle)
+                       or (Wnd = ListView.Handle) or (Wnd = MessageListView.Handle)
+                       then
+                               SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (Mouse.CursorPos.X shl 16) or Mouse.CursorPos.Y )
+                       else
+                               Handled := False;
+
+{
+//                     if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
+                               // TWebBrowser \82Ì Handle \82Æ\94ä\8ar\82µ\82Ä\82à\88ê\92v\82µ\82È\82¢\82Ì\82Å\8dÀ\95W\82Å TWebBrowser \82©\82Ç\82¤\82©\94»\92è
+                               browserPos.X := 0;
+                               browserPos.Y := 0;
+                               Windows.ClientToScreen( Browser.Handle, browserPos );
+                               if (Longword(Mouse.CursorPos.X - browserPos.X) >= Browser.Width)
+                               or (Longword(Mouse.CursorPos.Y - browserPos.Y) >= Browser.Height)
+                               or (Longword(Mouse.CursorPos.Y - browserPos.Y) < 0)
+                               or (Longword(Mouse.CursorPos.Y - browserPos.Y) < 0) then begin
+//                             or not FActiveContent.Browser.Focused then
+                                       // TWebBrowser \82Í\96³\8cÀ\83\8b\81[\83v\82·\82é\82Ì\82Å\82»\82ê\88È\8aO\82È\82ç\83R\83\93\83g\83\8d\81[\83\8b\82É\91\97\90M
+                                       if (Wnd <> BrowserToolBar.Handle) and (Wnd <> BrowserNameToolBar.Handle) then
+                                               SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (Mouse.CursorPos.X shl 16) or Mouse.CursorPos.Y )
+                                       else
+                                               Handled := False;
+                               end else begin
+                                       Handled := False;
+                               end;
+//                     end else begin
+//                             SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (MousePos.X shl 16) or MousePos.Y );
+//                     end;
+}              end;
        end;
 end;
 
@@ -8671,9 +9010,10 @@ begin
                ModifySelectList;
        end else if Length( SelectComboBox.Text ) = 0 then
        begin
-               AllItemAction.Checked := True;
-               LogItemAction.Checked := False;
-               NewItemAction.Checked := False;
+               {* SelectComboBox.Text\82ª\8bó\82Å\82à\81A\93ü\97Í\93r\92\86\82ÅEsc\82µ\82½\82Æ\82©
+                * \8bó\82Ì\82Æ\82«\82ÉDel\83L\81[\82ð\89\9f\82µ\82½\82Æ\82©\82È\82Ì\82Å\81A\83X\83\8c\82Ì\8di\8d\9e\82Ý\82ð\88Û\8e\9d\82·\82é\81B
+                * \81i\82±\82±\82Å\82Í\89½\82à\82µ\82È\82¢\81j
+                *}
        end else begin
                // \83`\83\89\82Â\82­\82Æ\8c\99\82¾\82©\82ç\81A\88ê\89\9e\89\9f\82µ\82Ä\82 \82é\82Æ\82«\82¾\82¯\8f\88\97\9d\82·\82é
                if AllItemAction.Checked then
@@ -8804,11 +9144,6 @@ begin
        SelectResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
 end;
 
-procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
-       Shift: TShiftState);
-begin
-end;
-
 // \91S\82Ä\82Ì\83\8c\83X\82ð\95\\8e¦
 procedure TGikoForm.AllResActionExecute(Sender: TObject);
 var
@@ -9313,25 +9648,26 @@ end;
 procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
        Shift: TShiftState);
 begin
-
-       Case Key of
-       VK_F2:
-               begin
-                       FClickNode := FavoriteTreeView.Selected;
-                       FavoriteTreeViewRenameActionExecute( Sender );
-               end;
-       VK_DELETE:
-               begin
-                       FClickNode := FavoriteTreeView.Selected;
-                       FavoriteTreeViewDeleteActionExecute( Sender );
-               end;
-       VK_RETURN:
-               begin
-               FavoriteClick( FavoriteTreeView.Selected );
-               FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
+       if not TTreeView(Sender).IsEditing then begin
+               Case Key of
+               VK_F2:
+                       begin
+                               FClickNode := FavoriteTreeView.Selected;
+                               FavoriteTreeViewRenameActionExecute( Sender );
+                       end;
+               VK_DELETE:
+                       begin
+                               FClickNode := FavoriteTreeView.Selected;
+                               FavoriteTreeViewDeleteActionExecute( Sender );
+                       end;
+               VK_RETURN:
+                       begin
+                       FavoriteClick( FavoriteTreeView.Selected );
+                       FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
+                       end;
+               VK_SPACE:
+                       FavoriteTreeViewDblClick( Sender );
                end;
-       VK_SPACE:
-               FavoriteTreeViewDblClick( Sender );
        end;
 
 end;
@@ -9583,7 +9919,7 @@ end;
 procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
        Sender: TObject);
 const
-       DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+       DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
        DEL_TITLE = '\8dí\8f\9c\8am\94F';
 var
        ThreadItem: TThreadItem;
@@ -9726,7 +10062,7 @@ begin
                ThreadItem := FavThread.Item;
 
                try
-                       s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
+                       s := ThreadItem.Title + #13#10 + ThreadItem.URL + #13#10;
                        if s <> '' then
                                Clipboard.AsText := s;
                finally
@@ -9741,7 +10077,7 @@ begin
                                GikoSys.ReadSubjectFile(Board);
 
                try
-                       s := Board.URL + #13#10 + Board.Title + #13#10;
+                       s := Board.Title + #13#10 + Board.URL + #13#10;
                        if s <> '' then
                                Clipboard.AsText := s;
                finally
@@ -9798,7 +10134,12 @@ procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
 begin
        if FDragWFirst <> true then begin
                FDragWFirst := false;
-       end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin
+{
+       end else if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold)
+       and (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
+(*}
+       end else begin
+//*)
                if GikoSys.Setting.ListOrientation = gloHorizontal then begin
                        if GikoSys.Setting.ListWidthState = glsMin then begin
                                BrowserMaxAndFocusAction.Execute;
@@ -9882,9 +10223,9 @@ end;
 procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
 begin
        if FListViewBackGroundColor <> value then begin
-                       FListViewBackGroundColor := value;
-                               ListView.Color := FListViewBackGroundColor;
-               end;
+               FListViewBackGroundColor := value;
+               ListView.Color := FListViewBackGroundColor;
+       end;
 end;
 procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
 begin
@@ -10069,24 +10410,64 @@ begin
 end;
 
 procedure TGikoForm.TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
-begin
-        //RoundList.URLReplace(oldURLs, newURLs);
+var
+       i: Integer;
+                               j: Integer;
+                               tempString: string;
+                               tmpURL: string;
+                               oldHost: string;
+                               oldBoardName: string;
+                               newHost: string;
+                               newBoardName: string;
+                               TabList: TStringList;
+begin
+               TabList := TStringList.Create;
+               if oldURLs.Count <> newURLs.Count then
+                       Exit;
+               //\82±\82±\82©\82ç\81ABoard\82ÌURL\82Ì\95Ï\8dX
+               for j :=0 to oldURLs.Count - 1 do begin
+               for i :=0 to TabList.Count - 1 do begin
+                       if TabList.Text = oldURLs[j] then
+                                                       TabList.Text := newURLs[j];
+                       end;
+               end;
+               //\82±\82±\82Ü\82Å\81ABoard\82ÌURL\82Ì\95Ï\8dX
+
+               //\82±\82±\82©\82ç\81AThread\82ÌURL\82Ì\95Ï\8dX
+               //\96Ê\93|\82¾\82¯\82Çthread\82Í\82»\82ê\82¼\82êURL\82ð\83`\83\83\83b\83N\82µ\82È\82ª\82ç\82â\82Á\82Ä\82©\82È\82«\82á\82¢\82¯\82È\82¢\81B
+               for i := 0 to oldURLs.Count - 1 do begin
+                               tmpURL                  := Copy(oldURLs[i], 1, Length(oldURLs[i]) -1);
+                               oldHost                 := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
+                               oldBoardName    := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
+                               tmpURL                  := Copy(newURLs[i], 1, Length(newURLs[i]) -1);
+                               newHost                 := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
+                               newBoardName    := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
+
+                               for j := 0 to TabList.Count - 1 do begin
+                                               tempString := TabList.Text;
+                                               if ( AnsiPos(oldBoardName, tempString) <> 0 ) and ( AnsiPos(oldHost, tempString ) <> 0 ) then begin
+                                                       tempString := StringReplace(tempString, oldHost, newHost,[]);
+                                                               TabList.Text := tempString;
+                                               end;
+                               end;
 end;
+               //\82±\82±\82Ü\82Å\81AThread\82ÌURL\82Ì\95Ï\8dX
 
-// \8dÅ\8f¬\89»\82³\82ê\82é
+end;
+
+/// \8dÅ\8f¬\89»\82³\82ê\82é
 procedure TGikoForm.OnMinimize;
 begin
-       FIsMinimize := mtMinimizing;
-       if FActiveContent <> nil then
+       if FActiveContent <> nil then begin
+               FIsMinimize := mtMinimizing;
                FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
-       PostMessage( Handle, USER_MINIMIZED, 0, 0 );
+       end;
 end;
 
-// \8dÅ\8f¬\89»\82³\82ê\82½
+//\8dÅ\8f¬\89»\82³\82ê\82½ (OnResized \82©\82ç\8cÄ\82Î\82ê\82é)
 procedure TGikoForm.OnMinimized;
 begin
        FIsMinimize := mtMinimized;
-       FIsIgnoreResize := False;
 end;
 
 procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
@@ -10097,8 +10478,8 @@ var
        affectedBand    : TCoolBand;
        i                                                       : Integer;
 begin
-       if (FOldFormWidth = Width) and not IsIconic( Handle ) and not FIsIgnoreResize then begin
-               FIsIgnoreResize := True;
+       if (FOldFormWidth = Width) and not IsIconic( Handle ) and (FIsIgnoreResize = rtNone) then begin
+               FIsIgnoreResize := rtResizing;
                PostMessage( Handle, USER_RESIZED, 0, 0 );
                if not (Sender is TToolBar) or (CoolBar = nil) then
                        Exit;
@@ -10239,8 +10620,6 @@ begin
 end;
 // TreeView \82ª\83N\83\8a\83b\83N\82³\82ê\82½
 procedure TGikoForm.TreeClick( Node : TTreeNode );
-var
-       i: Integer;
 begin
 
        if Node = nil then
@@ -10254,16 +10633,7 @@ begin
                Exit;
        end;
 
-       if GetActiveList is TBBS then begin
-               for i := 0 to ListView.Columns.Count - 1 do
-                       GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
-       end else if GetActiveList is TCategory then begin
-               for i := 0 to ListView.Columns.Count - 1 do
-                       GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
-       end else if GetActiveList is TBoard then begin
-               for i := 0 to ListView.Columns.Count - 1 do
-                       GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
-       end;
+       ActiveListColumnSave;
 
        if TObject(Node.Data) is TBBS then begin
                SetActiveList(Node.data);
@@ -10378,7 +10748,6 @@ end;
 
 // \83M\83R\83i\83r\82Ì\83\81\83b\83Z\81[\83W\83\8b\81[\83v\82ð\89¡\8eæ\82è\82µ\82Ü\82·
 procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
-
 //var
 //     key                             : Word;
 begin
@@ -10444,7 +10813,7 @@ end;
 procedure TGikoForm.MessagePanelResize(Sender: TObject);
 begin
 
-       if FIsIgnoreResize then
+       if FIsIgnoreResize <> rtNone then
                Exit;
 
        if GikoSys.Setting.ListOrientation = gloVertical then begin
@@ -10457,10 +10826,30 @@ begin
 end;
 
 procedure TGikoForm.OnResized;
+var
+       doc                                             : Variant;
 begin
 
        FOldFormWidth := Width;
-       FIsIgnoreResize := False;
+       FIsIgnoreResize := rtNone;
+
+       case FIsMinimize of
+       mtMinimizing:
+               begin
+                       // \8dÅ\8f¬\89»\92\86\82Å\82 \82é
+                       PostMessage( Handle, USER_MINIMIZED, 0, 0 );
+               end;
+
+       mtMinimized:
+               begin
+                       // \8dÅ\8f¬\89»\82Í\8aù\82É\8a®\97¹\82µ\82Ä\82¢\82é (\82Â\82Ü\82è\83^\83X\83N\83o\81[\82©\82ç\83E\83B\83\93\83h\83E\82ð\95\9c\8c³\92\86)
+                       if FActiveContent <> nil then begin
+                               doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
+                               doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
+                       end;
+                       FIsMinimize := mtNone;
+               end;
+       end;
 
 end;
 
@@ -10492,8 +10881,12 @@ begin
                Self.FEvent.Free;
        if Self.FBrowser <> nil then begin
                if Self.Thread <> nil then begin
-                       doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
-                       Self.Thread.ScrollTop := doc.Body.ScrollTop;
+                       //\83^\83u\82Ì\95\9c\8c³\82Å\95\9c\8c³\82³\82ê\82½\83X\83\8c\82Í\81A\95`\89æ\82³\82ê\82Ä\82¢\82È\82¢\82Æ\82«\82ª\82 \82é\82Ì\82Å
+                       //\82»\82Ì\82Æ\82«\82Ì\83X\83N\83\8d\81[\83\8b\97Ê\82ð\95Û\91\82µ\82Ä\82µ\82Ü\82¤\82Æ\83g\83b\83v\82É\96ß\82Á\82Ä\82µ\82Ü\82¤\81B
+                       if Self.FBrowser.OleObject.Document.documentElement.innerText <> '' then begin
+                               doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
+                               Self.Thread.ScrollTop := doc.Body.ScrollTop;
+                       end;
                end;
                //TOleControl(Self.FBrowser).Visible := false;
                ShowWindow(Self.FBrowser.Handle, SW_HIDE);
@@ -10539,7 +10932,7 @@ begin
        ListView.SetFocus;
        if( ListView.Items.Count > 0 ) and (ListView.ItemFocused = nil) then
                ListView.Items.Item[0].Selected := true //\91I\91ð\83A\83C\83e\83\80\82ª\96³\82¢\82Æ\82«\82Í\90æ\93ª\82Ì\82ð\91I\91ð\82·\82é
-       else begin
+       else if ListView.Items.Count > 0 then begin
                ListView.Scroll(-ListView.ClientWidth, -ListView.ClientHeight);
                rct := ListView.ItemFocused.DisplayRect(drBounds);
                ListView.Scroll(0, 2 * rct.Top - rct.Bottom);
@@ -10772,12 +11165,16 @@ begin
                SelectListItem(List);
                for i := 0 to List.Count - 1 do begin
                        if TObject(List[i]) is TThreadItem then begin
-                               TThreadItem(List[i]).UnRead := false;
-                               TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
+                               if (TThreadItem(List[i]).UnRead) then begin
+                                       TThreadItem(List[i]).UnRead := false;
+                                       TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
+                               end;
                        end;
                end;
                if TreeView.Visible then
                        TreeView.Refresh;
+               if ListView.Visible then
+               ListView.Refresh;
        finally
                List.Free;
        end;
@@ -10793,12 +11190,16 @@ begin
                SelectListItem(List);
                for i := 0 to List.Count - 1 do begin
                        if TObject(List[i]) is TThreadItem then begin
-                               TThreadItem(List[i]).UnRead := true;
-                               TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
+                               if (TThreadItem(List[i]).IsLogFile) and (not TThreadItem(List[i]).UnRead) then begin
+                                       TThreadItem(List[i]).UnRead := true;
+                                       TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
+                               end;
                        end;
                end;
                if TreeView.Visible then
                        TreeView.Refresh;
+               if ListView.Visible then
+               ListView.Refresh;
        finally
                List.Free;
        end;
@@ -10809,11 +11210,8 @@ procedure TGikoForm.BrowserPanelCanResize(Sender: TObject; var NewWidth,
 var
        i: Integer;
 begin
-       for i := 0 to BROWSER_COUNT - 1 do
+       for i := BROWSER_COUNT - 1 downto 0 do begin
                SetWindowPos(TWebBrowser(FBrowsers[i]).Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
-
-       if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
-               SetWindowPos(FActiveContent.Browser.Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
        end;
 end;
 
@@ -10920,6 +11318,7 @@ var
 begin
        fileName := ExtractFilePath(Application.ExeName) + 'tab.sav';
        URLs := TStringList.Create();
+       GikoTab := GikoSys.Setting.BrowserTabAppend;
        try
                try
                        if FileExists(fileName) then
@@ -10934,7 +11333,7 @@ begin
                        Exit;
                end;
 
-               GikoTab := GikoSys.Setting.BrowserTabAppend;
+
                GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
                for i := 0 to URLs.Count - 1 do begin
                        item := BBSsFindThreadFromURL( URLs[ i ] );
@@ -10951,7 +11350,7 @@ end;
 procedure TGikoForm.TabsSaveToFileActionExecute(Sender: TObject);
 var
        SaveTabList: TStringList;
-        Result: Boolean;
+       Result: Boolean;
 begin
        SaveTabList := TStringList.Create;
        try
@@ -10966,12 +11365,13 @@ end;
 
 procedure TGikoForm.TabsOpenFromFileActionExecute(Sender: TObject);
 var
-       i, Tab    : Integer;
+       i    : Integer;
        item        : TThreadItem;
        URLs : TStringList;
        GikoTab: TGikoTabAppend;
 begin
        URLs := TStringList.Create();
+       GikoTab := GikoSys.Setting.BrowserTabAppend;
        try
                try
 //                     if TabOpenDialog.Execute then begin
@@ -10980,7 +11380,7 @@ begin
                except
                        on EFOpenError do ShowMessage('\83^\83u\83t\83@\83C\83\8b\82ª\8aJ\82¯\82Ü\82¹\82ñ');
                end;
-               GikoTab := GikoSys.Setting.BrowserTabAppend;
+
                GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
                for i := 0 to URLs.Count - 1 do begin
                        item := BBSsFindThreadFromURL( URLs[ i ] );
@@ -11171,6 +11571,225 @@ begin
        LoadTabURLs;
 end;
 
+/// ListView \82Ì\83J\83\89\83\80\95\9d\82¨\82æ\82Ñ\88Ê\92u\82Ì\95Û\91
+procedure TGikoForm.ActiveListColumnSave;
+var
+       ActivListObj    : TObject;
+       i, id, idx              : Integer;
+       BBSOrder                        : TGikoBBSColumnList;
+       CategoryOrder   : TGikoCategoryColumnList;
+       BoardOrder              : TGikoBoardColumnList;
+begin
+
+       ActivListObj := ActiveList;
+       if ActivListObj is TBBS then begin
+               //===== \83J\83e\83S\83\8a\83\8a\83X\83g =====
+               BBSOrder := TGikoBBSColumnList.Create;
+               try
+                       for i := 0 to ListView.Columns.Count - 1 do begin
+                               // \8f\87\8f\98\82Ì\8eæ\93¾
+                               idx := ListView.Column[ i ].Tag;
+                               id := Ord( GikoSys.Setting.BBSColumnOrder[ idx ] );
+                               BBSOrder.Add( TGikoBBSColumnID( id ) );
+                               // \95\9d\82Ì\95Û\91
+                               GikoSys.Setting.BBSColumnWidth[ id ] := ListView.Column[ i ].Width;
+                       end;
+                       for i := 0 to ListView.Columns.Count - 1 do
+                               // \8f\87\8f\98\82Ì\95Û\91
+                               GikoSys.Setting.BBSColumnOrder[ i ] := BBSOrder[ i ];
+               finally
+                       BBSOrder.Free;
+               end;
+       end else if ActivListObj is TCategory then begin
+               //===== \94Â\83\8a\83X\83g =====
+               CategoryOrder := TGikoCategoryColumnList.Create;
+               try
+                       for i := 0 to ListView.Columns.Count - 1 do begin
+                               // \8f\87\8f\98\82Ì\8eæ\93¾
+                               idx := ListView.Column[ i ].Tag;
+                               id := Ord( GikoSys.Setting.CategoryColumnOrder[ idx ] );
+                               CategoryOrder.Add( TGikoCategoryColumnID( id ) );
+                               // \95\9d\82Ì\95Û\91
+                               GikoSys.Setting.CategoryColumnWidth[ id ] := ListView.Column[ i ].Width;
+                       end;
+                       for i := 0 to ListView.Columns.Count - 1 do
+                               // \8f\87\8f\98\82Ì\95Û\91
+                               GikoSys.Setting.CategoryColumnOrder[ i ] := CategoryOrder[ i ];
+               finally
+                       CategoryOrder.Free;
+               end;
+       end else if ActivListObj is TBoard then begin
+               //===== \83X\83\8c\83\8a\83X\83g =====
+               BoardOrder := TGikoBoardColumnList.Create;
+               try
+                       for i := 0 to ListView.Columns.Count - 1 do begin
+                               // \8f\87\8f\98\82Ì\8eæ\93¾
+                               idx := ListView.Column[ i ].Tag;
+                               id := Ord( GikoSys.Setting.BoardColumnOrder[ idx ] );
+                               BoardOrder.Add( TGikoBoardColumnID( id ) );
+                               // \95\9d\82Ì\95Û\91
+                               GikoSys.Setting.BoardColumnWidth[ id ] := ListView.Column[ i ].Width;
+                       end;
+                       for i := 0 to ListView.Columns.Count - 1 do
+                               // \8f\87\8f\98\82Ì\95Û\91
+                               GikoSys.Setting.BoardColumnOrder[ i ] := BoardOrder[ i ];
+               finally
+                       BoardOrder.Free;
+               end;
+       end;
+       
+end;
+
+procedure TGikoForm.ListViewColumnRightClick(Sender: TObject;
+       Column: TListColumn; Point: TPoint);
+var
+       i, j    : Integer;
+       item    : TMenuItem;
+begin
+
+       // \83|\83b\83v\83A\83b\83v\83\81\83j\83\85\81[\82ð\83N\83\8a\83A
+       for i := ListColumnPopupMenu.Items.Count - 1 downto 0 do
+               ListColumnPopupMenu.Items.Items[ i ].Free;
+
+       // \83\81\83j\83\85\81[\82Ì\8dì\90¬ (\83\81\83C\83\93\83J\83\89\83\80\82Í\95K\90{\82È\82Ì\82Å\83\81\83j\83\85\81[\82É\8aÜ\82ß\82È\82¢)
+       if TObject( FActiveList ) is TBBS then begin
+
+               //===== \83J\83e\83S\83\8a\83\8a\83X\83g =====
+               for i := 1 to Length( GikoBBSColumnCaption ) - 1 do begin
+                       item := TMenuItem.Create( ListColumnPopupMenu );
+                       item.Caption := GikoBBSColumnCaption[ i ];
+                       item.Tag := i;
+                       item.OnClick := ListColumnPopupMenuOnClick;
+                       for j := GikoSys.Setting.BBSColumnOrder.Count - 1 downto 0 do begin
+                               if GikoSys.Setting.BBSColumnOrder[ j ] = TGikoBBSColumnID( i ) then begin
+                                       item.Checked := True;
+                                       Break;
+                               end;
+                       end;
+                       ListColumnPopupMenu.Items.Add( item );
+               end;
+
+       end else if TObject( FActiveList ) is TCategory then begin
+
+               //===== \94Â\83\8a\83X\83g =====
+               for i := 1 to Length( GikoCategoryColumnCaption ) - 1 do begin
+                       item := TMenuItem.Create( ListColumnPopupMenu );
+                       item.Caption := GikoCategoryColumnCaption[ i ];
+                       item.Tag := i;
+                       item.OnClick := ListColumnPopupMenuOnClick;
+                       for j := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 0 do begin
+                               if GikoSys.Setting.CategoryColumnOrder[ j ] = TGikoCategoryColumnID( i ) then begin
+                                       item.Checked := True;
+                                       Break;
+                               end;
+                       end;
+                       ListColumnPopupMenu.Items.Add( item );
+               end;
+
+       end else if TObject( FActiveList ) is TBoard then begin
+
+               //===== \83X\83\8c\83\8a\83X\83g =====
+               for i := 1 to Length( GikoBoardColumnCaption ) - 1 do begin
+                       item := TMenuItem.Create( ListColumnPopupMenu );
+                       item.Caption := GikoBoardColumnCaption[ i ];
+                       item.Tag := i;
+                       item.OnClick := ListColumnPopupMenuOnClick;
+                       for j := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 0 do begin
+                               if GikoSys.Setting.BoardColumnOrder[ j ] = TGikoBoardColumnID( i ) then begin
+                                       item.Checked := True;
+                                       Break;
+                               end;
+                       end;
+                       ListColumnPopupMenu.Items.Add( item );
+               end;
+
+       end;
+
+       // \83\81\83j\83\85\81[\82Ì\95\\8e¦
+       Point := ListView.ClientToScreen( Point );
+       if ListColumnPopupMenu.Items.Count > 0 then
+               ListColumnPopupMenu.Popup( Point.X, Point.Y );
+
+end;
+
+/// ListColumnPopupMenu \83A\83C\83e\83\80\82Ì\83N\83\8a\83b\83N\83C\83x\83\93\83g
+procedure      TGikoForm.ListColumnPopupMenuOnClick( Sender : TObject );
+var
+       i                                       : Integer;
+       orderList       : TList;
+       item                    : TMenuItem;
+begin
+
+       if not (Sender is TMenuItem) then
+               Exit;
+
+       ActiveListColumnSave;
+       item := TMenuItem( Sender );
+
+       if TObject( FActiveList ) is TBBS then
+               orderList := GikoSys.Setting.BBSColumnOrder
+       else if TObject( FActiveList ) is TCategory then
+               orderList := GikoSys.Setting.CategoryColumnOrder
+       else if TObject( FActiveList ) is TBoard then
+               orderList := GikoSys.Setting.BoardColumnOrder
+       else
+               Exit;
+
+       if item.Checked then begin
+               // \83J\83\89\83\80\82Ì\8dí\8f\9c
+               for i := orderList.Count - 1 downto 0 do begin
+                       if Integer( orderList[ i ] ) = item.Tag then begin
+                               orderList.Delete( i );
+                               Break;
+                       end;
+               end;
+       end else begin
+               // \83J\83\89\83\80\82Ì\92Ç\89Á
+               orderList.Add( Pointer( item.Tag ) );
+       end;
+
+       SetActiveList( FActiveList );
+
+end;
+//\8ew\92è\82µ\82½\94Ô\8d\86\82Ì\83\8c\83X\82Éjump\82·\82éAction
+procedure TGikoForm.JumpToNumOfResActionExecute(Sender: TObject);
+var
+       str: string;
+       res: integer;
+begin
+       str := '1';
+       if( InputQuery('\8ew\92è\82µ\82½\94Ô\8d\86\82Ì\83\8c\83X\82É\94ò\82Ô', '\94Ô\8d\86\82ð\93ü\97Í\82µ\82Ä\82­\82¾\82³\82¢', str) ) then begin
+               str := ZenToHan(str);
+               res := StrToIntDef(str, -1);
+               if (res > 0) and (res <= GetActiveContent.Count) then begin
+                       BrowserMovement(IntToStr(res), FActiveContent);
+                       SetFocusForBrowserAction.Execute;
+               end else if res > GetActiveContent.Count then begin
+                       BrowserMovement(IntToStr(GetActiveContent.Count), FActiveContent);
+                       SetFocusForBrowserAction.Execute;
+               end;
+       end;
+end;
+
+procedure TGikoForm.JumpToNumOfResActionUpdate(Sender: TObject);
+begin
+       JumpToNumOfResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
+end;
+
+procedure TGikoForm.FavoriteTreeViewCollapseActionExecute(Sender: TObject);
+var
+       node    : TTreeNode;
+begin
+
+       node := FavoriteTreeView.Items.GetFirstNode;
+       while node <> nil do begin
+               if node.HasChildren then
+                       node.Expanded := False;
+               node := node.GetNext;
+       end;
+
+end;
+
 initialization
                                OleInitialize(nil);
 finalization