Thank you for your sample. It works. It doesn't behave the way as I expect. I can move the window to the other monitor, but I can't edit the decouple child windows with the BlackBox menu.
- Helmut
How to move a BlackBox document view to the second monitor?
Re: How to move a BlackBox document view to the second monit
I can - sometimes!Zinn wrote:... but I can't edit the decouple child windows with the BlackBox menu.- Helmut
Sometimes the BlackBox Menus are completely disabled (I can't even close the main window), sometimes they do drop down, but have no effect. For example the text color in the decoupled child does not change. And sometimes they work properly.
Sometimes I can't edit the child at all.
The behaviour seems to be different if I use the Decouple Command from a Button in a Form, or if I make it a normal menu item. But this is not consistent, so I'm not sure if I'm imagining this difference.
This seems to be a useful feature, but only if it can be made to operate reliably.
Re: How to move a BlackBox document view to the second monit
Frustrating: This is a useful feature, but not reliable enough.Robert wrote:This seems to be a useful feature, but only if it can be made to operate reliably.
This morning I wanted to minimise the main BlackBox window, but couldn't without first opening a new window; typing a few characters at random, then closing it.
Re: How to move a BlackBox document view to the second monit
@Robert
I modified it, You can give it a try;
I modified it, You can give it a try;
Code: Select all
PROCEDURE DecoupleChildWindow* ;
(* Decouples the currently focussed child window from the Hostwindows.main,
such that it can float freely over the desktop *)
VAR
win: HostWindows.Window; style: SET;
res: INTEGER;
BEGIN
win := HostWindows.dir.Focus(Controllers.targetPath);
IF (win # NIL)&(HostWindows.dir.Next(win) # NIL) THEN
HostWindows.dir.Select(HostWindows.dir.Next(win),FALSE);
style := BITS(WinApi.GetWindowLongW(win.wnd, WinApi.GWL_STYLE)); (* window style *)
res := WinApi.SetWindowLong(win.wnd, WinApi.GWL_HWNDPARENT, 0);
res := WinApi.SetWindowLong(win.wnd, WinApi.GWL_STYLE, ORD(style + WinApi.WS_POPUP - WinApi.WS_CHILD));
END;
END DecoupleChildWindow;
Last edited by luowy on Fri Jun 12, 2020 1:09 am, edited 1 time in total.
Re: How to move a BlackBox document view to the second monit
Still not ideal!luowy wrote:@Robert I modified it, You can give it a try;
I've done very few tests, but:
1 - The Attributes menu does not work; I could not set some selected text to red.
2 - Sometimes (not always!) when I focus the child, then drag it over the main BlackBox window, it goes behind rather than in front.
Re: How to move a BlackBox document view to the second monit
1, yes, it has changed parent, being a sibling window of BB, out of control of the BB' menus,
but the shotcuts can work。
In order to use the BB menu, can press F2, duplicate a sub window to edit,
it's a normal MDI window, synchronized with the popup;
2, remove the style WS_CHILD, the proc has been updated;
but the shotcuts can work。
In order to use the BB menu, can press F2, duplicate a sub window to edit,
it's a normal MDI window, synchronized with the popup;
2, remove the style WS_CHILD, the proc has been updated;
Re: How to move a BlackBox document view to the second monit
That's a good solution for me - works well.luowy wrote:In order to use the BB menu, can press F2, duplicate a sub window to edit,
it's a normal MDI window, synchronized with the popup
What seems to be the case is that when you focus a "freed" window, then move it to another (maybe the main BlackBox, or your email program, or whatever) it goes behind which is not what I want.Robert wrote:Sometimes (not always!) when I focus the child, then drag it over the main BlackBox window, it goes behind rather than in front.
BUT, if the "freed" window is already partially overlapping the other window when you focus it, it goes in front.
Now I understand this behaviour it is fine for me.
Thanks.