Load navigators depending on screen resolution

. Using this code, you can provide different navigators depending on the size of the screen.

This Content Component encountered an error

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

scrnwidth=Str(getsystemmetrics(16))
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;
@PostedCommand([OpenNavigator];"Main1024";"1");
@PostedCommand([OpenNavigator];"Main800";"1"))

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;
@Command([Compose];"Form1024");
@Command([Compose];"Form800"))
This was first published in May 2002

Dig deeper on Lotus Notes Domino Administration Tools

0 comments

Oldest 

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:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close