Posted by: Freeman | Date: 03/24/2015 20:44 | IP: IP Logged
pspad:I will find any second monitor and I will test it.
We can ask kamuz to test compiled sample.
Posted by: johnbentley | Date: 06/27/2015 13:24 | IP: IP Logged
On my triple monitor setup I can report the same problem as the OP.
I've tested the compiled sample. I keep the "Move application button" box ticked, but sometimes the taskbar icon correctly moves with the open application (to the next monitor); sometimes it doesn't.
I'll call my monitors "1", "2", "3" from left to right. With windows explorer open on 2 (the middle) I open the appliation (the compiled sample):
* Bad: The application opens on 3, with taskbar icon on 3. The application/taskbar correspondence is correct, but it shouldn't open on a different monitor.
* Good: Drag the application to 2. Icon correctly follows to 2.
* Good: Drag the application to 1. Icon correctly follow to 1.
* Bad: Drag the application to 2. Icon remains on 3.
* Bad: Drag the application to 3. Icon moves to 2.
I repeat variations of the above. The pattern is deteriministic, but I can never get the icon back to 3 (after the initial opening).
A very strange bug indeed. I'm on build 2665.
Edit: With the "Move application button" box unticked the taskbar icon correctly stays where it was last left.
Edited 2 time(s). Last edit at 06/27/2015 13:27 by johnbentley.
Posted by: bkneepkens | Date: 06/20/2016 09:22 | IP: IP Logged
I experienced the same problem with a Delphi application. The solution proved to be as follows.
I don't know what Delphi version was used to build PSPad, but this is what I did in Delphi 7:
1. In FormCreate, hide the VCL-controlled taskbar button and assign an handler for the OnActivate event:
procedure TfrmMain.FormCreate(Sender: TObject);
Application.OnActivate := OnApplicationActivate;
// Hide the taskbar button for the zero-size Application window.
// We'll let Windows deal with taskbar buttons and not the VCL.
windowLong := ((GetWindowLong(Application.Handle, GWL_EXSTYLE) and (not WS_EX_APPWINDOW)) or WS_EX_TOOLWINDOW);
SetWindowLong(Application.Handle, GWL_EXSTYLE, windowLong);
2. Implement the OnActivate event as follows:
procedure TfrmMain.OnApplicationActivate(Sender: TObject);
// Set the focus to the currently visible form. This may not always
// happen automatically because we're bypassing part of the VCL.
3. Override CreateParams to show a taskbar button:
procedure CreateParams(var Params: TCreateParams); override;
procedure TfrmMain.CreateParams(var Params: TCreateParams);
// Show a taskbar button
params.ExStyle := (params.ExStyle or WS_EX_APPWINDOW);
// Set the desktop as the window's parent.
// Without this the taskbar button will still appear, but then it
// won't move to Windows 10's second taskbar if the window is moved
// to a secondary monitor. (This is probably also true for Windows 8,
// but I haven't been able to test that).
params.WndParent := GetDesktopWindow();
4. Handle the WM_SYSCOMMAND message to support minimize/restore:
procedure WMSysCommand(var msg: TWmSysCommand); message WM_SYSCOMMAND;
procedure TfrmMain.WMSysCommand(var msg: TWmSysCommand);
// Bypass the VCL and let the Windows API
// handle minimize/restore functionality.
case (msg.CmdType and $FFF0) of
msg.Result := 0;
SC_RESTORE : begin
msg.Result := 0;
Hmm, the forum removes indentation, even within code tags... oh well. Hope this helps
Posted by: pspad | Date: 06/20/2016 09:51 | IP: IP Logged
Thank you. I will test it.
Don't be worry about indentation. I got all forum adds into mail, there is it indented.
Posted by: PGomersall | Date: 01/26/2017 14:57 | IP: IP Logged
In current development build 2743 situation is still the same. Have you any update on finding a fix to this?
Posted by: PGomersall | Date: 01/26/2017 15:21 | IP: IP Logged
Just a follow up; maybe it is partially fixed? If I move PSPad to new monitor, nothing happens to its icon; it stays on taskbar of originating monitor. However, after the move, if I minimize PSPad then it shows on correct taskbar.
Posted by: pspad | Date: 01/26/2017 18:11 | IP: IP Logged
PSPad uses old Delphi version now. I need to move it to new IDE version. It will be better than spend lot of time finding solution.
Posted by: Maya21 | Date: 01/27/2017 09:16 | IP: IP Logged
sasumner:I noticed a multiple displays issue recently regarding what appears on which screen; maybe it is a known issue. I am using pspad 4.5.9 (2512).
At my desk I have a two-external-monitor setup with a notebook PC in a docking station; I keep the notebook's lid closed so that its screen isn't used. I run pspad's main window on the secondary monitor (the one without the Win7 taskbar at the bottom). This is the normal situation and all is good.
When I undock my PC and use it with its single screen, pspad's main window will "move" there after undocking (this is correct). When I do a replace the find/replace dialog comes up fine and I enter my search and this crazy bulk review replace text, but if I check the Prompt on Replace checkbox (as I usually do), the prompt dialog that should show upon each find match is not visible. I can still press Y or N (or Esc) for each found match, so I think the prompt dialog is actually there, it is just still on the second screen (which isn't there at this point).
This happen to me one (although i came back from a party)
Posted by: CieraBrier | Date: 01/31/2017 08:04 | IP: IP Logged
pspad:Freeman:Jan, I wrote small sample, but cannot test it, because I have only one monitor:
Thank you. I will find any second monitor and I will test it.
MainForm to hidden Application.Handle, on every Application.MainForm move.
Posted by: CieraBrier | Date: 01/31/2017 23:11 | IP: IP Logged
Freeman:kamuz:Open PSPad and move main window to secondary monitor and icon on taskbar does not follows window.
Jan, I wrote small sample, but cannot test it, because I have only one monitor:
TMainForm = class(TForm)
procedure WMWindowPosChanged(var Msg: TWMWindowPosChanged); message WM_WINDOWPOSCHANGED;
procedure TMainForm.WMWindowPosChanged(var Msg: TWMWindowPosChanged);
if not (csLoading in ComponentState) then
with Msg.WindowPos^ do
MoveWindow(Application.Handle, x, y, cx, cy, True);
Edited 1 time(s). Last edit at 02/06/2017 07:34 by pspad.