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: 65
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: 125
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: 65
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: 36
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: 65
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: 125
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland


Return to Common questions

Who is online

Users browsing this forum: No registered users and 0 guests

cron