Source language: Translate to:

CustomWindow on second monitor

General questions about NeoBook

Moderator: Neosoft Support

CustomWindow on second monitor

Postby ebear » Thu Jul 03, 2014 12:59 pm

Hello All,

I'm already trying for a while but without success.

I have a Notebook with connected a second monitor. The second monitor is the "Main monitor" and is 1920x1080, the Notebook screen is the extended monitor at left 1920 top 0 (so the notebook is at the right side in windows config).
Now I try to open a CustomWindow (non exclusive) on the Notebook monitor, i tried "Left 1920" and "Top 0" (The main application is maximized on the main monitor). After this I tried several more Lefts and Tops, but this give not the effect I wanted. If I move the CustomWindow manually to the notebook screen of course it works....

The code is very simple, I use two TextEntry boxes to alter [Left] and [Top]

Code: Select all
CustomWindow "" "[Left]" "[Top]" "Container1" "Sizeable"


What I'm doing wrong????

Best regards,


Eric
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic

Re: CustomWindow on second monitor

Postby ebear » Thu Jul 03, 2014 1:09 pm

Hello All,

Okay Okay I was a little bit quick with my question, but I found a solution which works fine....
For this I used "the great ZmFunctions":

Code: Select all
CustomWindow "" "[Left]" "[Top]" "Container1" "Sizeable"
zmSetWindowPos "[Container1.WinHandle]" "[Left]" "[Top]" "[Width]" "[Height]" "AlwaysOnTop" ""


And of cause I don't want to forget the master "npUtils" ( David :D ):

Code: Select all
npSetWindowPos "[Container1.WinHandle]" "[Left]" "[Top]" "[Result]"
npSetWindowSize "[Container1.WinHandle]" "[Width]" "[Height]" "[Result]"


Maybe someone with a other solution, otherwise I hope I can someone help with the same problem.

Best regards,

Eric
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic

Re: CustomWindow on second monitor

Postby Neosoft Support » Fri Jul 04, 2014 10:11 am

The CustomWindow position is relative to the main pub window not the desktop. You can try subtracting [PubLeft] and [PubTop] from your left/top variables to position the window in screen coordinates. For example:

CustomWindow "" "[Left]-[PubLeft]" "[Top]-[PubTop]" "Container1" "Sizeable"
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 2 guests