Source language: Translate to:

|résolu]is it possible: automatically resize the screen

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

|résolu]is it possible: automatically resize the screen

Postby mycomenius » Sun Feb 06, 2011 9:33 am

hello
I have to choose the size of the screen in book properties.
is it possible to have an option:
automatically resize the screen
bcause my project will turn on old (1024x768)and new screen(1440x900)
thanks
didier
Last edited by mycomenius on Sat Feb 19, 2011 9:53 am, edited 1 time in total.
User avatar
mycomenius
 
Posts: 78
Joined: Sun Jan 30, 2011 6:15 am
Location: France / Provence

Postby Gaev » Sun Feb 06, 2011 9:58 am

didier:

Check out the section in the Help File called Predefined Global Variables ... in subsection called Read-Write Variables, you will find ...
[PubWidth]
The width of the interior of the publication window (the client area).

[PubHeight]
The height of the interior of the publication window (the client area).

[WindowLeft]
The screen Y location of the upper left of the publication window.

[WindowTop]
The screen X location of the upper left of the publication window.

[WindowWidth]
The width of the publication window including the border and scroll bars (if any).

[WindowHeight]
The height of the publication window including the title bar, border and scroll bars (if any).
User avatar
Gaev
 
Posts: 3717
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby mycomenius » Sun Feb 06, 2011 10:09 am

hello
My english is not very good.I don't understand.
what do you mean? is it possible to change the size of my window in a large screen?
thanks
didier
User avatar
mycomenius
 
Posts: 78
Joined: Sun Jan 30, 2011 6:15 am
Location: France / Provence

Postby Gaev » Sun Feb 06, 2011 11:30 am

didier:

You will help yourself a lot by exploiting the excellent Help File that comes with NeoBook.

NeoBook makes most functionality as simple as reading or writing Global Variables ... in this case, you can set the size and positioning of your publication's window merely by changing the contents of the associated variable ... using the SetVar command e.g.
Code: Select all
SetVar "[WindowWidth]"  "1440"
User avatar
Gaev
 
Posts: 3717
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby mycomenius » Sun Feb 06, 2011 12:00 pm

thanks it's OK

And do you think that neobook can detect the size of the screen of the computer and assign it to the 2 variables [I] an [J] for example.

so it could be possible to write this code
Code: Select all
SetVar "[PubWidth]"  "[I]"
SetVar "[PubHeight]"  "[J]"


thank you very much
didier
User avatar
mycomenius
 
Posts: 78
Joined: Sun Jan 30, 2011 6:15 am
Location: France / Provence

Postby HPW » Sun Feb 06, 2011 12:31 pm

Under predefined global variables you will find this read-only variables:

[ScreenHeight] The height the entire Windows screen in pixels.

[ScreenWidth] The width of the entire Windows screen in pixels.

You may also have a look at tutorial:

Tutorial 4: Creating a Resizable Publication
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby mycomenius » Sun Feb 06, 2011 12:57 pm

thank you very much and excuse me for my bad english
didier
User avatar
mycomenius
 
Posts: 78
Joined: Sun Jan 30, 2011 6:15 am
Location: France / Provence


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests