How to move a BlackBox document view to the second monitor?

Usage of the framework, compiler and tools

How to move a BlackBox document view to the second monitor?

Postby Zinn » Thu Apr 11, 2019 6:29 am

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
Zinn
 
Posts: 73
Joined: Mon Nov 24, 2014 10:47 am

Re: How to move a BlackBox document view to the second monit

Postby Robert » Thu Apr 11, 2019 7:40 am

I spread my main BlackBox window over both screens.
TwoMonitors.jpg
Two monitors
User avatar
Robert
 
Posts: 130
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: How to move a BlackBox document view to the second monit

Postby Zinn » Sun Apr 14, 2019 3:22 pm

Hello Robert,
How do you spread it over both screen? I can spread it over one screen only.
- Helmut
Zinn
 
Posts: 73
Joined: Mon Nov 24, 2014 10:47 am

Re: How to move a BlackBox document view to the second monit

Postby cfbsoftware » Mon Apr 15, 2019 11:47 am

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.
cfbsoftware
 
Posts: 37
Joined: Wed Sep 18, 2013 10:06 pm

Re: How to move a BlackBox document view to the second monit

Postby Zinn » Mon Apr 15, 2019 4:40 pm

Hello Chris,
it works as you descript. Wonderful. Thank you very much for great tip.
- Helmut
Zinn
 
Posts: 73
Joined: Mon Nov 24, 2014 10:47 am

Re: How to move a BlackBox document view to the second monit

Postby Robert » Tue Apr 16, 2019 6:31 pm

Zinn wrote:Hello Robert,
How do you spread it over both screen? I can spread it over one screen only.
- Helmut

I do use the "Drag the Window edges" method, but also do it automatically.

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;
User avatar
Robert
 
Posts: 130
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: How to move a BlackBox document view to the second monit

Postby Ivan Denisov » Sat Apr 20, 2019 2:03 pm

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).
Attachments
Host.zip
(32.3 KiB) Downloaded 18 times
User avatar
Ivan Denisov
 
Posts: 264
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: How to move a BlackBox document view to the second monit

Postby Zinn » Mon Apr 22, 2019 5:01 pm

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
Zinn
 
Posts: 73
Joined: Mon Nov 24, 2014 10:47 am

Re: How to move a BlackBox document view to the second monit

Postby Ivan Denisov » Fri Apr 26, 2019 5:06 am

Zinn wrote:I tried your noMDI version and it works.
Do you use this version on your Linux computer?

I used it for one project, when using separate SDL2 window for 3D graphics and there was no Linux version of BlackBox.
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.

Zinn wrote:I observed that my Toolbar at the top and the status bar at the bottom aren't displayed. I miss them.

It is disappearing then no BlackBox windows have focus.[/quote]

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.

Zinn wrote:Thanks a lot for your sample.

Thanks for X512 for his work: http://oberspace.dyndns.org/index.php/topic,626.0.html
I just make some changes in hist version for 1.7.
User avatar
Ivan Denisov
 
Posts: 264
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia


Return to Common questions

Who is online

Users browsing this forum: No registered users and 0 guests

cron