When using multiple databases with a common navigation framework, views often are not focused by default when launched within frames. This causes an annoying issue for end-users, as they have to click on the view to set the focus. This tip is simple and resolves this issue once and for all.
1) Create Notes form (called dlgFocus). Within the form, create a layout region, and make it as small as possible.
2) In Post Open event of the form type:
This will force the form to close immediatly after it has been opened.
3) In the Post Open event of the view you want to launch, add this code:
Dim session As New NotesSession Dim ws As New NotesUIWorkspace Dim dbCurrent As NotesDatabase Set dbCurrent = session.currentDatabase Call ws.DialogBox("dlgFocus",True,True,,,,,, dbCurrent.GetDocumentByUNID(source.View.UniversalID))
When the view is launch, the code will run and will force the dlgFocus to open but immediatly close it as per instructions in step 2, leaving you with the focus on the view.
We have discovered a feature for bookmarking these framesets via drag and dropping the window to the bookmark bar. It might become the view that gets bookmarked instead of the frameset. If so, one possible error could be that the window-title contains "-" somehow. If that is removed, it works much better again.
In the Frame selection in Designer, all you need to do is set the checkbox on the second tab to "Set Initial Focus ".
Do you have comments on this tip? Let us know.
This tip was submitted to the SearchDomino.com tip exchange by member Jose Zaldivar. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our bimonthly tip contest and you could win a prize and a spot in our Hall of Fame.