Source language: Translate to:

Screen resolution

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Screen resolution

Postby KG6439 » Wed Oct 12, 2005 8:03 am

Quick question.

Is it possible to make the screen resolution change on the users computer to accomidate my program?

Example I have a program that needs to run with a screen resolution of 1024 x 768 but the user has their computer set to 640 x 480 which is too small. Can I force a resolution change on their system while my program is running?
KG6439
 
Posts: 9
Joined: Fri Sep 23, 2005 11:21 am

Re: Screen resolution

Postby dpayer » Wed Oct 12, 2005 10:55 am

KG6439 wrote:Quick question.

Is it possible to make the screen resolution change on the users computer to accomidate my program?

Example I have a program that needs to run with a screen resolution of 1024 x 768 but the user has their computer set to 640 x 480 which is too small. Can I force a resolution change on their system while my program is running?


1) How will you know the video card supports your resolution? (some older computers cannot exceed 800/600

2) How will you know the monitor itself can support that resolution even if the card supports it?

You may want to test resolution changes with people by guiding them in the process of using the display options of control panel. If you have ever been in the situation of changing the resolution of a system to a number other than the supported level of the monitor (I have, it aint pretty) then you better go slow in changing this.

(Hint: if you change the resolution of a system to something larger than the monitor can support, then they can't see anything. When they reboot, it is still the same situation, they can't see anything. They will have to hook up a monitor that can support this resolution to solve the problem. True most now are 1024x768 but you will find a few svga monitors out there, trust me. Hmmm... maybe your program will be a way to find all of them!)

David P

David P.
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

re: Screen Resolution

Postby TonyL » Wed Oct 12, 2005 2:07 pm

I have the same problem. What I am now doing is creating 2 exe's. One for 800x600 and one for 1024x768. These are the two most used resolutions. I use a screen resolution detect script to lanch the approprate exe for the end users system.

The only alternative is to code each object in your program to resize and move in responce to the end users screen resolution.

Wish there was a plug-in that could do this. I would pay a kings ransome for it.

Tony :(
TonyL
 
Posts: 40
Joined: Mon Sep 19, 2005 7:20 pm

Postby beno » Wed Oct 12, 2005 2:20 pm

Hi Tony,

The only alternative is to code each object in your program to resize and move in responce to the end users screen resolution.


You have the idea. Of course this involves calculations and do a more complex GUI design so everything will look nice after adjusting to the target screen resolution.

The Container Object can help to accomplish this.

Mmmhh, this is a lot of work to do but definitely will offer the best results.

In the other hand, I think a plugin will never do this, plugins does not know nothing about GUI design.

My cent,

beno
User avatar
beno
 
Posts: 678
Joined: Fri Apr 01, 2005 9:03 am
Location: México

Postby djold1 » Wed Oct 12, 2005 2:31 pm

I have a NeoV4 application that displays very large high res images of antique maps on the users display. It is not a slide show since each map to view is picked from a menu on the main 800x600 application.

The main map selector application screen always centers itself in the display but does not resize. When the application loads, it senses the screen res by reading the NeoBook global variables and stores it in a regular variable.

I want the displayed map to almost fill the users screen no matter what the resolution from 800x600 up. The map display also has some buttons and zoom sliders, etc.

I created four separate custom windows for sizes 800x660, 1024, 768, 1280, 1600, etc. I could have a few or as many of any size as I want with minimum effort. The windows are slightly smaller than the true resolution. Each custom window contains the Picture Tool, the zoom tool, some buttons, etc. laid out in sizes appropriate to the resolution. Most of the variable names are in the strange array nomenclature that Neobook uses so that I don't have a lot of duplicate or redundant code. Each custom window and its components are of course grouped under a common name. Ex: G1028, G800, etc. Almost all the actions are in subroutines.

So, if the screen res is 1028, when the user selects a map image to display it will load the correct size custom window and the map will display almost full screen. I also have a radio box that allows the user to select a different size display screen as long as it will fit on the monitor.

This has worked really well for me and the customers really like it. It's easy to maintain and modify because it is so modular. And I really like to program in a modular fashion with minimum duplicate code. When I decide to take it to NeoV5 sometime next year I will use the Containers and maybe some of the resizing features.

Not really what you were looking for probably, but it might offer a few ideas...
Pete Charlton
djold1
 
Posts: 28
Joined: Sat Apr 02, 2005 8:39 am

re Screen resolution

Postby TonyL » Wed Oct 12, 2005 3:55 pm

maybe this can be of help http://www.12noon.com/reschange.htm
TonyL
 
Posts: 40
Joined: Mon Sep 19, 2005 7:20 pm

Postby Neosoft Support » Wed Oct 12, 2005 4:35 pm

If your publication is set to run in full screen mode (Book Properties > Window), you also also have the option of selecting "Switch to compatible video mode". This will attempt to match the PC's video mode to the size and color resolution of your publication. If the PC doesn't support the required resolution, NeoBook will select the next closest match. When the publication closes, NeoBook will restore the user's original settings.

With NeoBook 5, it's usually no longer necessary to create multiple publications for different screen resolutions. The new Container object can be used in most cases to build publications that adapt automatically to any size screen. Tutorial 4, Creating a Resizable Publication, in the help file describes how this can be done.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Dynamically changing the Apps Res to suit the Desktop Res

Postby ITSquare2 » Wed May 31, 2006 10:39 am

Not sure if this helps you but it's certainly been helpful in my own projects. In Neobook 5 I've set my entire App up in Containers which automatically resize and move or resize elements inside them to suit the dimensions of the desktop, and using:

Code: Select all
SetVar "[WindowWidth]" "[ScreenWidth]"
SetVar "[WindowHeight]" "[ScreenHeight]-30"


in the Books Action Script when setting your App to start at the Top Left side of the desktop allows the App to resize itself to the desktop dimensions fairly accurately, (the '-30' lets the app bottom end approximately just above the Windows taskbar).

This all works well with seperate Containers which are set to use 'Right side', 'Left side', and 'Centre' to set up the look and layout of your App.


Regards,
Peter
ITSquare2
 


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests

cron