Re: [Feedreader-development] New build
Brought to you by:
toomastoots
From: Toomas T. <to...@i-...> - 2004-01-31 01:02:11
|
One possible place for error is below. This change is done by me. What I wanted to do is to have feedreader window bringed to front if it is behind other windows. Problem could be that if this procedure is called from thread then something goes wrong. Maybe we should get rid of following lines : if self.Visible then begin application.bringtofront; ---->>>>>>>> SetForegroundWindow(Self.Handle); ---->>>>>>>> BringWindowToTop(Self.Handle); exit; end; old version: procedure TMainWindow.actShowWindowExecute(Sender: TObject); begin if self.Visible then exit; AnimateTrayIcon( False ); if MainWindow.WindowState = wsminimized then MainWindow.WindowState := ws; CoolTrayIcon1.ShowMainForm; application.restore; application.bringtofront; SetForegroundWindow(Self.Handle); BringWindowToTop(Self.Handle); end; new version : procedure TMainWindow.actShowWindowExecute(Sender: TObject); begin if self.Visible then begin application.bringtofront; SetForegroundWindow(Self.Handle); BringWindowToTop(Self.Handle); exit; end; AnimateTrayIcon( False ); if MainWindow.WindowState = wsminimized then MainWindow.WindowState := ws; CoolTrayIcon1.ShowMainForm; application.restore; application.bringtofront; SetForegroundWindow(Self.Handle); BringWindowToTop(Self.Handle); end; |