Exit Notes Without Using File-Exit or the @Command({FileExit})

Uses WIN32 API Functions.


Put this in your DECLARATIONS SECTION:

 Declare Function FindWindow Lib "user32" Alias "FindWindowA"(Byval lpClassName As String, Byval lpWindowName As String) As Long Declare Function PostMessage Lib "user32" Alias "PostMessageA" (Byval hwnd As Long, Byval wMag As Long, Byval wParam As Long, lParam As Any) As Long Const WM_CLOSE = &H10

Put this code behind a hotspot or view action button:

 Dim session As New notessession Dim user As String Dim winHwnd As Long Dim retVal As Long user = session.commonusername winHWnd = FindWindow("Notes","Welcome - Lotus Notes") If winHwnd <> 0 Then Messagebox "Goodbye " & Cstr(user),MB_OK,"Message From Hal" PostMessage winHwnd, WM_CLOSE, 0&, 0& Else Messagebox (Cstr(Err)) End If

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

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 ...

SearchDataCenter

SearchContentManagement

Close