I work with BlackBox on a computer with two monitors. I can move a BlackBox form out of the main BlackBox window to the second monitor but not a BlackBox document view. I would like to move also a document to the second monitor like I can do it with the form.
How to move a BlackBox document view to the second monitor?
- 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 spread my main BlackBox window over both screens.
Re: How to move a BlackBox document view to the second monit
Hello Robert,
How do you spread it over both screen? I can spread it over one screen only.
- Helmut
How do you spread it over both screen? I can spread it over one screen only.
- Helmut
-
- Posts: 55
- Joined: Wed Sep 18, 2013 10:06 pm
- Contact:
Re: How to move a BlackBox document view to the second monit
I grab the right hand edge of the window with the mouse and drag it across the gap between the two screens to the other screen.
Can you move the Blackbox window from one screen to the other? If you can do that you should be able to move it so that half is on one monitor and the other half is on the other monitor. Once you have that you should be able to resize the Window by dragging either of its sides. Note: if you click on the Maximise button it will then relocate itself to a single screen.
Can you move the Blackbox window from one screen to the other? If you can do that you should be able to move it so that half is on one monitor and the other half is on the other monitor. Once you have that you should be able to resize the Window by dragging either of its sides. Note: if you click on the Maximise button it will then relocate itself to a single screen.
Re: How to move a BlackBox document view to the second monit
Hello Chris,
it works as you descript. Wonderful. Thank you very much for great tip.
- Helmut
it works as you descript. Wonderful. Thank you very much for great tip.
- Helmut
Re: How to move a BlackBox document view to the second monit
I do use the "Drag the Window edges" method, but also do it automatically.Zinn wrote:Hello Robert,
How do you spread it over both screen? I can spread it over one screen only.
- Helmut
If I just double click on the BlackBox icon Windows gives me the same size as last time, but if I hold the <Shift> key I get my standard configuration, which is all the left monitor, and precisely enough of the right monitor for the Log.
I always increase the size of the Log, and set it to the right of the main window. (I also load a small clock into the bottom right corner; this is just a habbit.) The code to do this is in my Config module. The numbers required are got by trial and error!
Code: Select all
MODULE Config;
IMPORT Dialog, Converters, OleData, LibMisc, Windows, HostWindows, WinApi;
CONST
logW = 700; logH = 800;
PROCEDURE Setup*;
...
IF LibMisc.Shift () THEN res := WinApi.MoveWindow (HostWindows.main, -8, 0, 2638, 1086, 1) END;
Dialog.Call ("StdLog.Open", "", res);
Dialog.Call ("StdCmds.OpenAuxDialog ('Demo/Aclock', 'Aclock')", "", res);
Windows.dir.GetBounds (winW, winH);
LibMisc.SetWindowPlacement ('Aclock', winW - 170, winH - 187, 0, 0);
LibMisc.SetWindowPlacement ('#Dev:Log', winW - logW, 0, logW, logH);
PROCEDURE Shift* () : BOOLEAN;
BEGIN
RETURN WinApi.GetKeyState (WinApi.VK_SHIFT) < 0
END Shift;
PROCEDURE SetWindowPlacement* (IN title : Views.Title; x, y, w, h : INTEGER);
VAR
win : Windows.Window;
wTitle : Views.Title;
wnd : WinApi.HWND;
ret : WinApi.BOOL;
wp : WinApi.WINDOWPLACEMENT;
BEGIN
win := Windows.dir.First ();
WHILE win # NIL DO
win.GetTitle (wTitle);
IF wTitle = title THEN
wnd := win(HostWindows.Window).wnd;
IF (w = 0) & (h = 0) THEN
ret := WinApi.GetWindowPlacement (wnd, wp);
w := wp.rcNormalPosition.right - wp.rcNormalPosition.left;
h := wp.rcNormalPosition.bottom - wp.rcNormalPosition.top
END;
ret := WinApi.MoveWindow (wnd, x, y, w, h, 1);
RETURN
END;
win := Windows.dir.Next (win)
END
END SetWindowPlacement;
- Ivan Denisov
- Posts: 362
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Krasnoyarsk, Russia
Re: How to move a BlackBox document view to the second monit
Maybe someone will find this noMDI feature useful. It opens all documents as separate windows.
Compile Host/Mod/Windows.odc and Host/Mod/Menus.odc
Please check it in working directory or make backup of original HostMenus and HostWindows (or full Host subsystem).
Compile Host/Mod/Windows.odc and Host/Mod/Menus.odc
Please check it in working directory or make backup of original HostMenus and HostWindows (or full Host subsystem).
- Attachments
-
- Host.zip
- (32.3 KiB) Downloaded 595 times
Re: How to move a BlackBox document view to the second monit
Dear Iwan,
I tried your noMDI version and it works.
Do you use this version on your Linux computer?
I observed that my Toolbar at the top and the status bar at the bottom aren't displayed. I miss them.
Currently it is unfamiliar for me. It may changed when I work longer with it.
Another way could be to allow that a document moved out from the main window like the form can do it.
Thanks a lot for your sample.
- Helmut
I tried your noMDI version and it works.
Do you use this version on your Linux computer?
I observed that my Toolbar at the top and the status bar at the bottom aren't displayed. I miss them.
Currently it is unfamiliar for me. It may changed when I work longer with it.
Another way could be to allow that a document moved out from the main window like the form can do it.
Thanks a lot for your sample.
- Helmut
- Ivan Denisov
- Posts: 362
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Krasnoyarsk, Russia
Re: How to move a BlackBox document view to the second monit
I used it for one project, when using separate SDL2 window for 3D graphics and there was no Linux version of BlackBox.Zinn wrote:I tried your noMDI version and it works.
Do you use this version on your Linux computer?
Now I am not using it. Also I am always using one monitor, so have no such a problem with MDI when using BlackBox with Wine.
It is disappearing then no BlackBox windows have focus.[/quote]Zinn wrote:I observed that my Toolbar at the top and the status bar at the bottom aren't displayed. I miss them.
Currently it is unfamiliar for me. It may changed when I work longer with it.
Another way could be to allow that a document moved out from the main window like the form can do it.
Thanks for X512 for his work: http://oberspace.dyndns.org/index.php/topic,626.0.htmlZinn wrote:Thanks a lot for your sample.
I just make some changes in hist version for 1.7.
Re: How to move a BlackBox document view to the second monit
I wrote a very small procedure to get any window "floating" independent of the main BlackBox window. Maybe that also helps?
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 THEN
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;
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 THEN
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;