Load navigators depending on screen resolution

If your users use different screen resolutions you generally would have to design your navigators for the lowest common denominator. Using this code, you can provide different navigators depending on the size of the screen.

'Paste the following into the database script declarations:

Declare Function GetSystemMetrics Lib "user32" (Byval nIndex As Long) As Long

Sub Postopen(Source As Notesuidatabase)
Dim session As New NotesSession

'get the screen width and assign it to the screensize environment variable

Call session.SetEnvironmentVar( "screensize", scrnwidth)     
End Sub

I've found it is best to put the following code in the About document (hotspot, button etc..) and get the user to enter the database from there. This code will launch the relevant full screen navigator.

REM "Launches either the 1024*768 nav or 800*600"; 
@Command([FileCloseWindow]) ;
@If(@TextToNumber(@Environment("screensize")) > 1000;

From a normal navigator, use the same code to return to the main navigator if you are going between screens.

This code could also be used to load different size forms for document creation eg:-

@If(@TextToNumber(@Environment("screensize")) > 1000;

This was first published in May 2002

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.